我提前为回答我自己的问题而道歉但是我看到很多答案说明当你可以为WCF创建同样的东西时,需要将AddressFilterMode.Any添加为代码属性.在很多地方提出同样的问题,我认为在一个地方回答这个问题会更有益.
我们有几个使用负载均衡器的Web服务器.机器在端口81上运行IIS6.在外部,可以使用端口80访问站点.外部名称和机器名称不同.
我们得到了
System.ServiceModel.EndpointNotFoundException: The message with To '<url>' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree.
Run Code Online (Sandbox Code Playgroud)
web.config的相关部分是:
<endpoint binding="ws2007HttpBinding" bindingConfiguration="MyServiceBinding"
contract="MyService.IMyService" listenUriMode="Explicit" />
Run Code Online (Sandbox Code Playgroud)
我们尝试添加listenUri,但这并没有解决我们的问题.
有任何想法吗?