简体   繁体   English

WCF System.TimeoutException:套接字传输在00:00:00之后超时

[英]WCF System.TimeoutException: The socket transfer timed out after 00:00:00

I am using a wcf net tcp service hosted in WAS with windows authentication. 我正在使用WAS托管的wcf net tcp服务进行Windows身份验证。 The service consistently fails with a particular user credentials from a particular client machine. 该服务始终因特定客户端计算机的特定用户凭据而失败。 The credentials work on a different client machine. 凭据适用于其他客户端计算机。 Different credentials work on the client machine. 不同的凭据在客户端计算机上工作。 However, the service consistently fails with the error below using the particular client machine and credentials: 但是,使用特定客户端计算机和凭据时,服务始终失败,并显示以下错误:

System.TimeoutException: The open operation did not complete within the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout. ---> System.TimeoutException: The socket transfer timed out after 00:00:00. You have exceeded the timeout set on your binding. The time allotted to this operation may have been a portion of a longer timeout. ---> System.IO.IOException: The write operation failed, see inner exception. ---> System.TimeoutException: The socket transfer timed out after 00:00:00. You have exceeded the timeout set on your binding. The time allotted to this operation may have been a portion of a longer timeout.
   at System.ServiceModel.Channels.SocketConnection.SetWriteTimeout(TimeSpan timeout, Boolean synchronous)
   at System.ServiceModel.Channels.SocketConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)
   at System.ServiceModel.Channels.BufferedConnection.WriteNow(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, BufferManager bufferManager)
   at System.ServiceModel.Channels.BufferedConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)
   at System.ServiceModel.Channels.ConnectionStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.Net.Security.NegotiateStream.StartWriting(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.NegotiateStream.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   --- End of inner exception stack trace ---
   at System.Net.Security.NegotiateStream.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.NegotiateStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.ServiceModel.Channels.StreamConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)
   --- End of inner exception stack trace ---
   at System.ServiceModel.Channels.StreamConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)
   at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
   at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
   at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
   at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
   --- End of inner exception stack trace ---

Server stack trace: 
   at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
   at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Note that the timeout is after 00:00:00 even though it's configured for 00:01:00. 请注意,即使配置为00:01:00,超时也会在00:00:00之后。 This leads me to believe it is not actually a timeout issue. 这让我相信它实际上不是超时问题。 Here are my bindings: 这是我的绑定:

          <netTcpBinding>
        <binding name="NetTcpBinding_IMyAwesomeService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxConnections="10" maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
          <security mode="Transport">
            <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
            <!--<extendedProtectionPolicy policyEnforcement="Never" />-->
            <message clientCredentialType="Windows" />
          </security>
        </binding>
      </netTcpBinding>

I am setting up E2E tracing now and will post back after I get the results. 我现在正在设置E2E跟踪,并在收到结果后回复。

The timeout value you see in the exception means how much operation time is remained before timing out. 您在异常中看到的超时值表示超时前剩余的操作时间。 So, the above may certainly turn-up the issue with timeout. 所以,上面的问题肯定可以通过超时来解决问题。 the Timeout configured in your binding are low, where it seems to take more than 1 min. 绑定中配置的超时很低,似乎需要超过1分钟。 You can try increating timeout values, very likely the open timeout value. 您可以尝试增加超时值,很可能是打开超时值。

HTH Amit HTH Amit

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WCF-请求通道在1分钟后超时,而两侧的sendTimeout =“ 00:25:00” - WCF-The request channel timed out after 1 min, while sendTimeout=“00:25:00” on both sides WCF服务每23小时失败一次“请求频道在等待00:01:00之后的回复时超时” - WCF Service failing every 23 hours with “The request channel timed out while waiting for a reply after 00:01:00” 请求通道在00:00:59.9843740之后等待回复时超时 - The request channel timed out while waiting for a reply after 00:00:59.9843740 请求通道在 00:00:59.9844002 之后等待回复时超时。 收到此错误 - The request channel timed out while waiting for a reply after 00:00:59.9844002. Getting this error 请求频道在等待00:01:00错误后等待autocompleteextender超时 - The request channel timed out while waiting for a reply after 00:01:00 error for autocompleteextender WCF客户端在20分钟后引发System.TimeoutException - WCF client throws System.TimeoutException after 20mins WCF服务C#中的System.TimeoutException - System.TimeoutException in WCF service C# 从Biztalk调用wcf服务时出现System.TimeoutException - System.TimeoutException when calling wcf service from Biztalk ASP.NET 2.0 VB客户端将日期作为01/01/0001 00:00:00传递给WCF服务 - ASP.NET 2.0 VB Client passing dateime as 01/01/0001 00:00:00 to WCF Service WCF超时例外! mscorlib.dll中出现“System.TimeoutException”类型的异常 - WCF Timeout Exception! An exception of type 'System.TimeoutException' occurred in mscorlib.dll
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM