我們有一個.NET 3.5 Web應用程序,它使用第三方Web服務。該代理是通過向其wsdl添加Web引用而創建的。此代理未編譯。.Net間歇性System.Web.Services.Protocols.SoapHeaderException
我們的錯誤日誌正在回升,但頻繁的間歇例外:
型「System.Web.Services.Protocols.SoapHeaderException」的異常發生,遇上
如果我遵循的URL頁面那產生了異常,我不能重新創建它。
編輯:這是最例外的 - 它從
Message : Internal Error
Type : System.Web.Services.Protocols.SoapHeaderException, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Source : System.Web.Services Help link :
Actor :
Code : http://schemas.xmlsoap.org/soap/envelope/:Client
Detail :
Lang :
Node :
Role :
SubCode :
Data : System.Collections.ListDictionaryInternal
TargetSite : System.Object[] ReadResponse(System.Web.Services.Protocols.SoapClientMessage, System.Net.WebResponse, System.IO.Stream, Boolean)
Stack Trace : at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Vendor.getSearch(getSearchRequest getSearchRequest) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\be43c34e\b09edc7e\App_WebReferences.pww-cf-q.0.cs:line 73
編輯2冒泡:內部異常:
我有時會得到以下內部異常記錄在內:
Message : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
Type : System.IO.IOException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source : System
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Int32 Read(Byte[], Int32, Int32)
Stack Trace : at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.TlsStream.CallProcessAuthentication(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.ConnectStream.WriteHeaders(Boolean async)
和/或:
Message : An existing connection was forcibly closed by the remote host
Type : System.Net.Sockets.SocketException, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source : System
Help link :
ErrorCode : 10054
SocketErrorCode : ConnectionReset
NativeErrorCode : 10054
Data : System.Collections.ListDictionaryInternal
TargetSite : Int32 Receive(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags)
Stack Trace : at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
更新
我們仍在努力。最初有一個路線問題,解決了。我們仍然遇到套接字錯誤的內部異常。我們今天參與了MS支持,他們查看了一些跟蹤和網絡捕獲。 Web服務宿主,並循環DNS,他們可以在不同的IP地址進行響應的SYN SYN/ACK從一個IP,並從不同的IP下。不是很好。這可能與我們的情況很相似,但也可能適用於其他人。
Microsoft網絡監視器和一個應用程序跟蹤爲我們提供了我們需要的信息。
您能否提供例外的細節(即異常消息)? – 2010-02-07 15:48:43
原來,大多數例外都是由於dns問題引起的......有時候這只是與編程無關! – ScottE 2010-03-06 00:23:02
什麼是DNS問題的解決方案?我們有類似的問題。謝謝! – 2010-05-07 16:46:02