现在的位置: 首页 > 综合 > 正文

WCF常见错误之HTTP could not register URL http://+:80/Temporary_Listen_Addresses// because TCP port 80 is being used by

2012年08月24日 ⁄ 综合 ⁄ 共 1032字 ⁄ 字号 评论关闭

在配置wsDualHttpBinding回调时,启动客户端会出现这样的错误,我是在Asp.net Web App中调试的

解决方法:在客户端<bindings/>中添加clientBaseAddress

例如:<bindings>
      <wsDualHttpBinding>
        <binding name="WSDualHttpBinding_ICalculatorDuplex" clientBaseAddress="http://localhost:666/myClient/" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
          maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text"
          textEncoding="utf-8" useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00" />
          <security mode="Message">
            <message clientCredentialType="Windows" negotiateServiceCredential="true"
              algorithmSuite="Default" />
          </security>
        </binding>
      </wsDualHttpBinding>
    </bindings>

 

抱歉!评论已关闭.