在 dottrace 远程调试器连接期间 EndpointDispatcher 的 AddressFilter 不匹配

AddressFilter mismatch at the EndpointDispatcher during dottrace remote debugger connection

尝试通过负载平衡器连接到远程代理出现错误:

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>

您可以尝试使用此处描述的解决方法:http://androidyou.blogspot.com/2010/09/fix-wcf-addressfilter-mismatch-error.html 此外,您可以使用 dotTrace 控制台探查器而不是 Remote Agent:https://www.jetbrains.com/help/profiler/Performance_Profiling__Profiling_Using_the_Command_Line.html