负载均衡器后面的WCF - 如何设置

bh2*_*213 4 .net wcf wcf-binding

我们有几个使用负载均衡器的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,但这并没有解决我们的问题.

有任何想法吗?

bh2*_*213 7

[ServiceBehavior(AddressFilterMode=AddressFilterMode.Any)]
Run Code Online (Sandbox Code Playgroud)

将此属性置于服务上可以解决问题.