2011-03-03 109 views
18

有人知道這意味着什麼嗎?System.IO.IOException:由於意外的數據包格式而導致握手失敗?

System.Net.WebException:本 基礎連接已關閉:上一個發送發生 意外錯誤。 ---> System.IO.IOException:握手失敗,原因是意外的 數據包格式。在 System.Net.Security.SslState.StartReadFrame(字節[] 緩衝器,的Int32的ReadBytes, AsyncProtocolRequest asyncRequest)在 System.Net.Security.SslState.StartReceiveBlob(字節[] 緩衝器,AsyncProtocolRequest asyncRequest)在 系統.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken 消息,AsyncProtocolRequest asyncRequest)在 System.Net.Security.SslState.StartSendBlob(字節[] 傳入,計數的Int32, AsyncProtocolRequest asyncRequest)在 System.Net.Security。 SslState.ForceAuthentication(布爾型 receiveFirst,Byte []緩衝區, AsyncProtocolRequest asyncRequest)在 System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)在 System.Net.TlsStream.CallProcessAuthentication(對象 狀態)留在 System.Threading.ExecutionContext.runTryCode(對象 的UserData) System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode 代碼,CleanupCode backoutCode,對象 的UserData)在 System.Threading.ExecutionContext.RunInternal(的ExecutionContext 的ExecutionContext,ContextCallback 回調,對象狀態)在 System.Threading.ExecutionContext。運行(ExecutionContext 的ExecutionContext,ContextCallback 回調,對象狀態)在 System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult 結果)在 System.Net.TlsStream.Write(字節[] 緩衝器,的Int32偏移的Int32大小)在 系統。 Net.PooledStream.Write(字節[] 緩衝器,的Int32偏移的Int32大小)在 System.Net.ConnectStream.WriteHeaders(布爾 異步)---內部異常 堆棧跟蹤---結束在 System.Net .HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan 超時)在

編輯:

這是該方法我打電話:

_productsService =新ProductsPortTypeClient(); _productsService。GetResortProducts(GetProductsCredentials(), GetResortProductParams());

+0

當你遇到異常時,你在做什麼?也許你可以發佈完整的堆棧跟蹤? – 2011-03-03 09:29:51

+0

只是一個例行的web服務 - 請參閱編輯 – TheLearner 2011-03-03 09:40:28

+0

此webservice是否配置爲NTLM/Kerberoes身份驗證? – sajoshi 2011-03-03 09:49:37

回答

24

它看起來像是一個SSL身份驗證的問題,它在握手階段失敗,可能兩個實現不兼容,您可以檢查響應的WSDL格式,找出應該使用什麼格式進行通信,並檢查是否(你可以使用任何一種網絡監視軟件,例如Microsoft網絡監視器)

2

在我的情況下,它是Skype阻止443端口。轉到Skype工具 - 高級連接並禁用「使用端口80 & 443進行連接...」

+0

呃,這是一些惱人的Skype行爲。我無法計算我不得不使用Skype進行電話會議的次數,並且忘記了讓它繼續運行,然後開始撕掉我的頭髮,爲什麼我正在開發的Web服務器應用程序無法啓動。 – EricRRichards 2016-08-15 14:23:28

相關問題