2014-10-16 107 views
0

我們正在使用Facebook圖形API,Spring.Social.Twitter API來檢索聯繫人所有社交媒體調用都失敗,從我們的Web應用程序中,從所有API調用中我們都得到相同的異常。System.Net.WebException異常:底層連接已關閉:發送時發生意外錯誤。在社交媒體上致電

Twitter的API的GetResponse

Exception Type: System.Net.WebException 
Exception: The underlying connection was closed: An unexpected error occurred on a send. 
StackTrace: at System.Net.HttpWebRequest.GetResponse() 

Inner Exception --------------------------------------------------- 
Type: System.IO.IOException 
Exception: Received an unexpected EOF or 0 bytes from the transport stream. 
StackTrace: at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count) 
    at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, 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.Threading.ExecutionContext.runTryCode(Object userData) 
    at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) 
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) 
    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) 

Facebook的圖形API調用

這是圖形API調用堆棧跟蹤得到響應

Exception Type: Facebook.WebExceptionWrapper 
Exception: The underlying connection was closed: An unexpected error occurred on a send. 
StackTrace: at Facebook.HttpHelper.OpenRead() 
    at Facebook.FacebookClient.Api(HttpMethod httpMethod, String path, Object parameters, Type resultType) 
    at Facebook.FacebookClient.Get(String path, Object parameters, Type resultType) 

Inner Exception --------------------------------------------------- 
Type: System.IO.IOException 
Exception: Received an unexpected EOF or 0 bytes from the transport stream. 
StackTrace: at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count) 
    at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, 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.Threading.ExecutionContext.runTryCode(Object userData) 
    at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) 
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) 
    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) 

這是堆棧跟蹤所有的API調用。 在此先感謝。

注:如果我修改我的Web配置,一切都開始工作細一些hours.after,對所有的GET請求同樣的錯誤。

回答

0

我已經作出REST服務刪除以下行解決這要求

ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3; 

一旦這個ServicePointManager.SecurityProtocol在應用程序中SSL3設置了此將應用於整個Aplication。 之後,所有的Https調用將使用SSL3進行Request.and所做的請求將給我們提供以上錯誤

聲明SSL3協議Facebook,LinkedIn,和Twitter的脆弱性後,可能已經取消了對SSL3。 這裏是關於SSL3貴賓https://scotthelme.co.uk/sslv3-goes-to-the-dogs-poodle-kills-off-protocol/

的詳細資料
相關問題