在 WCF 中,receiveTimeout 应该小于 inactivityTimeout 吗?

Should receiveTimeout be less than inactivityTimeout in WCF?

在WCF 的netTcpBinding 中,receiveTimeout 应该小于inactivityTimeout。我有一个通信通道中止错误,所以我将 receiveTimeout 更改为 24 hour.I 现在收到此错误

<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
    <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
        <EventID>524298</EventID>
        <Type>3</Type>
        <SubType Name="Information">0</SubType>
        <Level>8</Level>
        <TimeCreated SystemTime="2015-05-01T18:53:48.2971907Z" />
        <Source Name="System.ServiceModel" />
        <Correlation ActivityID="{a39a898a-579d-4e50-9bdb-82b5b57b65f9}" />
        <Execution ProcessName="MyServiceHosting" ProcessID="3068" ThreadID="36" />
        <Channel />
        <Computer>SERVER</Computer>
    </System>
    <ApplicationData>
        <TraceData>
            <DataItem>
                <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Information">
                    <TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.CommunicationObjectFaultReason.aspx</TraceIdentifier>
                    <Description>CommunicationObject faulted due to exception.</Description>
                    <AppDomain>KaraokeServiceHosting.exe</AppDomain>
                    <ExtendedData xmlns="http://schemas.microsoft.com/2006/08/ServiceModel/MessageTraceRecord"/>
                    <Exception>
                        <ExceptionType>System.ServiceModel.CommunicationException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
                        <Message>The inactivity timeout of (00:05:30) has been exceeded.</Message>
                        <StackTrace>   at System.ServiceModel.Channels.CommunicationObject.Fault(Exception exception)
   at System.ServiceModel.Channels.ChannelReliableSession.OnLocalFault(Exception e, Message faultMessage, RequestContext context)
   at System.ServiceModel.Channels.ChannelReliableSession.OnLocalFault(Exception e, WsrmFault fault, RequestContext context)
   at System.ServiceModel.Channels.ChannelReliableSession.OnInactivityElapsed(Object state)
   at System.ServiceModel.Channels.InterruptibleTimer.OnTimerElapsed()
   at System.ServiceModel.Channels.InterruptibleTimer.OnTimerElapsed(Object state)
   at System.Runtime.ActionItem.DefaultActionItem.TraceAndInvoke()
   at System.Runtime.ActionItem.DefaultActionItem.Invoke()
   at System.Runtime.ActionItem.CallbackHelper.InvokeWithoutContext(Object state)
   at System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
   at System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
                        </StackTrace>
                        <ExceptionString>System.ServiceModel.CommunicationException: The inactivity timeout of (00:05:30) has been exceeded.</ExceptionString>
                    </Exception>
                </TraceRecord>
            </DataItem>
        </TraceData>
    </ApplicationData>
</E2ETraceEvent>

我的绑定是

 <netTcpBinding>
    <binding name="myBinding" receiveTimeout="24:0:0" maxReceivedMessageSize="999999999" maxBufferSize="999999999" maxBufferPoolSize="999999999">
      <reliableSession enabled="true" inactivityTimeout="0:5:30"/>     
      <security mode="None"/>
    </binding>
  </netTcpBinding>

我怀疑发生错误是因为当回调被发送到客户端时,它会等到 24 小时才能响应,而通信通道在绑定之前达到 5 分半钟时出现故障。我的假设正确吗? recieveTimeout 是否应始终小于或等于 inactivityTimeout?

我想正确的答案是对以下问题的回答: WCF - Binding.ReceiveTimeout & ReliableSession.InactivityTimeout

基本上-根据该答案-receiveTimeout 应该始终高于或等于 inactivityTimeout