BufferNotEnough Could not create SSL/TLS secure ch

2019-06-11 21:15发布

问题:

Some times we receive the error "The request was aborted: Could not create SSL/TLS secure channel.." I tried to investigate this issue, and the trace log I got for this is:

System.Net Information: 0 : [4356] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=**BufferNotEnough**).
System.Net Error: 0 : [4356] Exception in HttpWebRequest#37434592:: - The request was aborted: Could not create SSL/TLS secure channel..
System.Net Error: 0 : [4356] Exception in HttpWebRequest#37434592::EndGetRequestStream - The request was aborted: Could not create SSL/TLS secure channel..

What does it mean BufferNotEnough for this case?

Thanks.

回答1:

This seems to be a bug in HttpWebRequest in .NET 4.6.1 - see https://connect.microsoft.com/VisualStudio/feedback/details/2777134/tls-1-2-handshake-error