Win7中的wsDualHttpBinding错误

时间:2012-04-27 08:59:09

标签: wcf wcf-binding wcf-client wsdualhttpbinding

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

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

我第一次遇到此错误:

  

HTTP无法注册网址   http://+:80/Temporary_Listen_Addresses/cc6f2e30-ff08-4bfc-8397-d67630337a9c/   因为TCP端口80正被另一个应用程序使用。例外   在主UI线程1上处理。

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

  

HTTP无法注册网址http://+:91/NightlyBuild/NonVer/Communication/。您的   进程对此命名空间没有访问权限(请参阅   http://go.microsoft.com/fwlink/?LinkId=70353了解详情)。例外   在主UI线程1上处理。

好的我发现有些评论表示需要以管理员模式运行客户端应用程序,我也这样做,我没有得到前两个错误,但这次我在屏幕冻结5分钟后出现超时错误。< / p>

超时错误

  

打开的操作未在指定的超时时间内完成   00:05:00。分配给此操作的时间可能是一部分   更长的超时在主UI线程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>

真的没有想法,有什么意见吗?

1 个答案:

答案 0 :(得分:0)

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

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

相关问题