2016-06-24 7 views
0

私は.NET 3.5 Winフォームアプリケーションから残りのWebサービス(HTTP GET)を呼び出すしようとすると、私は次のエラーを取得する:HTTP要求エラーを取得します。「リモート側がトランスポートストリームを閉じたため、認証に失敗しました。

 `Authentication failed because the remote party has closed the transport stream. 
StackTrace: 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.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 
     at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 
     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)` 

ブラウザから実行した場合、要求は正常に動作します。 これは、.net 3.5ではサポートされていない上位tlsプロトコルを使用するサーバーに関連する問題ですか?ここで は、Webサービスを呼び出すために私のコードです:

XElement response = XElement.Load(url); 

答えて

0

はい、ほとんどがそうな理由は、Webサーバが1.2をTLSということです。 https://github.com/juhovh/AaltoTLS
私はこのサードパーティのコードを使用していませんし、それを推奨しません - それはあなたの適性を決めることです。

関連する問題