Blog from Saravanan Arumugam

Let us talk about Technologies

HTTP could not register URL … because TCP port 80 is being used by another application

When I used a Duplex channeled binding (wsDualHttpBinding), during the run time I received the following exception.


HTTP could not register URL http://+:80/Temporary_Listen_Addresses/634f73f6-c612-4441-acf8-79ddd5c62f98/ because TCP port 80 is being used by another application.

This is because the port 80 is being used by the IIS (the default web site uses Port 80) and the callback from the service attempts to register the same port for communication.


The solution to this is to instruct the WCF to use a different port. I had to add the following binding configuration.



        <binding name="wsDualHttpBinding_IGreetingService" 





I also had to specify the bindingConfiguration in endpoint to point to this.

<endpoint address="ws" binding="wsDualHttpBinding" 


But unfortunately specifying the clientBaseAddress in service configuration doesn’t take part in the WSDL. As a result clientBaseAddress won’t show up in the client side config. There is no negotiation happening during the runtime either.

So instead of providing the clientBaseAddress in the service side, create the proxy and config as usual and then provide the clientBaseAddress by modifying the client side configuration.

As a result, the client side configuration should typically be looking like this.

              <binding name="WSDualHttpBinding_IGreetingService"
                <security mode="Message">
                  <message clientCredentialType="Windows" 
                      algorithmSuite="Default" />
            <endpoint address="http://localhost:54927/GreetingService.svc/ws"
                    <userPrincipalName value="xxx\xxxx" />

Note: By default the Visual Studio would not be able to register even http://localhost:8088/clientCallbackUrl if it is used for the first time due to security constraints.

Refer to HTTP could not register URL for further detail.

An alternate solution to using netsh command is to run the Visual Studio itself in Administrator mode.


4 responses to “HTTP could not register URL … because TCP port 80 is being used by another application

  1. Pingback: Simple Duplex Contract Implementation « Blog from Saravanan Arumugam

  2. avtobazar April 15, 2011 at 5:54 am

    Thanks – where is article source?

  3. Richard Haber July 12, 2012 at 5:13 pm

    Here I am over a year later and you’ve helped me solve a problem that just started happening today after a Windows 7 update. Had been working OK for many month and then stopped. But you fixed it!

  4. Pingback: HTTP could not register URL … because TCP port 80 is being used by another application | Blog from Saravanan Arumugam | tarakvbhatt

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: