0

I have one server/client app where server is hosted in IIS server, and many clients will connect to that IIS server, Dual binding is use to broadcast message from server to clients.

I am develop in my Vista machine which has no error, however when we test the client app on client PC, which is using Windows 7, I got error.

First time I have this error:

HTTP could not register URL http://+:80/Temporary_Listen_Addresses/cc6f2e30-ff08-4bfc-8397-d67630337a9c/ because TCP port 80 is being used by another application. Exception handled on main UI thread 1.

according to solution from internet, I have added a clientBaseAddress in client config file (No change and never add clientBaseAddress in server config), now I get second error:

HTTP could not register URL http://+:91/NightlyBuild/NonVer/Communication/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details). Exception handled on main UI thread 1.

Ok I found some comments said need to run the client app in administrator mode, I do that as well, I do not get the previous two errors, but this time I get timeout error after the screen freeze for 5 minutes.

Timeout error

The open operation did not complete within the allotted timeout of 00:05:00. The time allotted to this operation may have been a portion of a longer timeout. Exception handled on main UI thread 1.

Below is the client config that I am using when I hits second error.

<wsDualHttpBinding>
        <binding name="WSDualHttpBinding_ICommunicationService"
                 closeTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="00:10:00" sendTimeout="00:05:00"
                 bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                 maxBufferPoolSize="0" maxReceivedMessageSize="2147483647"
                 messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" 
                 clientBaseAddress="http://remote-server:8001/Communication/">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00" />
          <!--<security mode="Message">
            <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" />
          </security>-->
          <security mode="None" />
        </binding>

Endpoint in client config:

<client>
      <endpoint address="http://remote-server:90/Communication/CommunicationService.svc" binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_ICommunicationService" contract="CommunicationService.ICommunicationService" name="WSDualHttpBinding_ICommunicationService">
      </endpoint>
    </client>

Really run out of idea, any comments?

tzuhsun
  • 91
  • 1
  • 7
  • What about turning off the firewall to verify if it blocks incoming calls? – Ladislav Mrnka Apr 27 '12 at 09:27
  • Do you means the firewall in IIS server? I never turn it off but my Vista machine is work well, also for WinXP this issue is fixed after added the clientBaseAddress, but no luck for Win 7. But I will try your way to see if it related. Thanks. – tzuhsun Apr 27 '12 at 09:31
  • No. By default every Windows machine uses firewall including your Win7. You have configured your client to listen for callbacks on unexpected port 91 (btw you should use port greater than 1024) so if the firewall is running it is most probably not opened for this port. – Ladislav Mrnka Apr 27 '12 at 09:34
  • I tried turn off firewall in client PC and server, and change the port from 91 to 8001, still get the same result – tzuhsun Apr 27 '12 at 09:42
  • Just for you information this issue not happen in Vista PC – tzuhsun Apr 27 '12 at 09:43
  • Can your server ping your Win7 machine? This doesn't look like programming issue but either client configuration or network configuration issue. Btw. is remote-server name of your client machine? The client address should use the name of the client machine visible for the server. – Ladislav Mrnka Apr 27 '12 at 09:49
  • oh, the 'remote-server' refer to the name of IIS server, not the name of client PC, should I change it to localhost:8001? it is because the endpoint in my client config is pointing to remote-server, I will update that config now. – tzuhsun Apr 27 '12 at 09:56
  • I've change the clientBaseAddress to "http://localhost:8001/Communication/" but no luck still get back the same error – tzuhsun Apr 27 '12 at 10:11

1 Answers1

0

The client "HTTP could not register..." error occurs because the specified url is not registered to the user you run the process under.

To solve this temporarily, you can use the HTTPNamespaceManager.exe program to modify the list of URL access reservations on the local computer. Get it here: PaulWh's Tech Blog

thefellow3j
  • 104
  • 4