WCF常见错误之HTTP could not register URL http://+:80/Temporary_Listen_Addresses/<guid>/ because TCP port 80 is being used by
在配置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>