2011-03-24 19 views
5

Windows kimlik doğrulaması ile WAS içinde barındırılan bir wcf net tcp hizmeti kullanıyorum. Hizmet, belirli bir istemci makinesinden belirli bir kullanıcı kimlik bilgisi ile sürekli olarak başarısız olur. Kimlik bilgileri farklı bir istemci makinesinde çalışır. Farklı kimlik bilgileri, istemci makinede çalışır. Zaman aşımı bunun 00:01:00 için yapılandırılmış olsa bile 00:00:00 peşinde olduğuWCF System.TimeoutException: Soket aktarımı 00:00:00 sonra zaman aşımına uğradı

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) 

Not: Ancak, hizmetin sürekli belirli istemci makine ve kimlik bilgilerini kullanarak aşağıdaki hata ile başarısız olur. Bu aslında bir zaman aşımı sorunu olduğuna inanmamı sağlıyor. İşte benim bağlarım:

  <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> 

Şimdi E2E izlemeyi ayarlıyorum ve sonuçları aldıktan sonra geri göndereceğim.

cevap

1

İstisnada gördüğünüz zaman aşımı değeri, zaman aşımından önce ne kadar çalışma süresinin kaldığı anlamına gelir. Yani, yukarıdaki sorun kesinlikle zaman aşımı ile açılabilir. Bağlantınızda yapılandırılan Zaman Aşımı, 1 dakikadan fazla sürdüğü yerlerde düşük. Zaman aşımı değerlerini, büyük olasılıkla açık zaman aşımı değerini tetiklemeyi deneyebilirsiniz.

HTH Amit

+0

Merhaba Amit, yanıt için teşekkürler. Zaman aşımı değerlerini değiştireceğim ama not ettiğim gibi 0 saniyeden sonra zaman aşımına uğrar. Aramanın tamamlanması bir saniyeden daha az zaman alacaktır, bu yüzden bir dakikadan daha fazla zaman alabileceğini bilmiyorum. – Noel

+0

Ayrıca, neden operasyon süresi olduğunu söylüyorsunuz? Açık zamana benziyor mu ...? – Noel

+0

Üzgünüm, benim kötü ... Sadece istisna mesajlarında zaman aşımı nasıl kaydedildiğini göstermeye niyetlendim. "0 saniyeden sonra zaman aşımına uğradı" ile ne kastettiğinizden emin değilim, bir saniye içinde isteğin başarısız olduğunu görüyor musunuz? – amit

İlgili konular