我设置了一组相互通信的服务;使用以下绑定,我会假设如果我“A”向“B”(活着)和“C”(不活着)发送一条消息,如果处理时间不超过定义的 sendTimeout,B 将返回,否则它将是超时异常。在“C”失败且不可用的情况下,我会假设它也会在 sendTimeout 定义的时间内返回。对于“B”,这似乎是正确的,但对于“C”,会捕获一个 EndpointNotFoundException,但它需要的时间比为 sendTimeout 定义的 5 秒长得多。我的配置中是否缺少某些内容。服务和客户端使用相同的绑定
<bindings>
<netTcpBinding>
<binding name="SSS" maxBufferPoolSize="524288" maxBufferSize="134217728" maxReceivedMessageSize="134217728" receiveTimeout="infinite" sendTimeout="00:00:05" portSharingEnabled="true">
<readerQuotas
maxDepth="32"
maxStringContentLength="65535"
maxArrayLength="16384"
maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" protectionLevel="None"/>
<message clientCredentialType="None"/>
</security>
<reliableSession ordered="true"/>
</binding>
</netTcpBinding>
</bindings>
<service behaviorConfiguration="DefaultBehavior" name="hostObj">
<endpoint binding="netTcpBinding" bindingConfiguration="SSS" contract="Contract.IHost" />
</service>
<endpoint name="serverAppHostEndpoint" binding="netTcpBinding" bindingConfiguration="SSS" contract="Contract.IHost" />
<behaviors>
<serviceBehaviors>
<behavior name="DefaultBehavior">
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="False" />
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>