2012-04-27 33 views
0

我有一个服务器/客户端应用程序,其中服务器托管在IIS服务器中,许多客户端将连接到该IIS服务器,双重绑定用于将消息从服​​务器广播到客户端。Win7中wsDualHttpBinding错误

我是在我的Vista机器上开发的,没有错误,但是当我们在使用Windows 7的客户端PC上测试客户端应用程序时,出现错误。

我第一次有这样的错误:

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.

根据从互联网解决方案,我已经添加在客户端配置文件中的clientBaseAddress(没有变化,从来没有在服务器配置添加clientBaseAddress),现在我得到第二个错误:

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.

好,我发现了一些评论说,需要运行在管理员模式下的客户端应用程序,我做到这一点为好,我不明白以前的两个错误,但这次我拿到后超时错误屏幕冻结5分钟。

超时错误

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.

下面是当我打第二个错误,我使用的客户端配置。

<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> 

端点在客户端配置:

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

真的跑出去的想法,什么意见吗?

+0

关闭防火墙以验证它是否阻止传入呼叫,如何? – 2012-04-27 09:27:08

+0

你是否指IIS服务器中的防火墙?我从来没有关闭它,但我的Vista机器运行良好,对于WinXP也是如此,这个问题在添加clientBaseAddress后得到修复,但是Win 7没有运气。但是我会试试你的方式来看看它是否相关。谢谢。 – tzuhsun 2012-04-27 09:31:41

+0

编号默认情况下,每台Windows机器都使用防火墙,包括Win7。你已经配置你的客户端监听意外端口91上的回调(顺便说一句,你应该使用大于1024的端口),所以如果防火墙运行,它很可能不会打开这个端口。 – 2012-04-27 09:34:18

回答

0

客户端“HTTP无法注册...”错误发生,因为指定的URL未注册到您运行该进程的用户。

要解决此问题,您可以使用HTTPNamespaceManager.exe程序修改本地计算机上的URL访问预留列表。在此处获取:PaulWh's Tech Blog

相关问题