尝试通过负载均衡器连接到远程代理会出现错误:
The message with To 'net.tcp/address/RemoteAgent' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree.
大多数解决方案都谈论将以下内容添加到服务代码中:
[ServiceBehavior(AddressFilterMode = AddressFilterMode.Any)]
可以在配置中执行某些操作以关闭AddressFilter匹配吗?
RemoteAgent.exe.config
的内容:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<system.serviceModel>
<services>
<service name="JetBrainsAgentService" behaviorConfiguration="JetBrainsAgentServiceBehavior" />
</services>
<bindings>
<wsHttpBinding>
<binding name="JetBrainsAgentBinding_WSHttp" maxReceivedMessageSize="2147483647" openTimeout="00:01:00" receiveTimeout="infinite" sendTimeout="00:01:00" closeTimeout="00:01:00">
<readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" />
<security mode="None" />
</binding>
</wsHttpBinding>
<netTcpBinding>
<binding name="JetBrainsAgentBinding_NetTcp" maxReceivedMessageSize="2147483647" openTimeout="00:01:00" receiveTimeout="infinite" sendTimeout="00:01:00" closeTimeout="00:01:00">
<readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" />
<security mode="None" />
</binding>
</netTcpBinding>
<netNamedPipeBinding>
<binding name="JetBrainsAgentBinding_NetNamedPipe" maxReceivedMessageSize="2147483647" openTimeout="00:01:00" receiveTimeout="infinite" sendTimeout="00:01:00" closeTimeout="00:01:00">
<readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" />
<security mode="None" />
</binding>
</netNamedPipeBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="JetBrainsAgentServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
答案 0 :(得分:1)
您可以尝试使用此处描述的解决方法:http://androidyou.blogspot.com/2010/09/fix-wcf-addressfilter-mismatch-error.html 另外,您可以使用dotTrace控制台探查器代替远程代理:https://www.jetbrains.com/help/profiler/Performance_Profiling__Profiling_Using_the_Command_Line.html