none
Decrypt failed with error 0X80090326 RRS feed

  • Question

  • Hi. I made an application that makes a call to a web service. The site running the web service uses SSL/TLS to secure the connection. When the application tries to negotiate the handshake, it receives this exception:

    ex AS System.Net.WebException = System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: The decryption operation failed, see inner exception. ---> System.ComponentModel.Win32Exception: The message received was unexpected or badly formatted
       --- End of inner exception stack trace ---
       at System.Net.Security._SslStream.ProcessReadErrorCode(SecurityStatus errorCode, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest, Byte[] extraBuffer)
       at System.Net.Security._SslStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
       at System.Net.Security._SslStream.StartFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
       at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
       at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
       at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
       at System.Net.TlsStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)

    The network log shows this:

    System.Net.Sockets Verbose: 0 : [1236] Exiting Socket#2327487::Receive()  -> 20#20
    System.Net Error: 0 : [1236] Decrypt failed with error 0X80090326.
    System.Net.Sockets Verbose: 0 : [1236] Socket#2327487::Dispose()
    System.Net Error: 0 : [1236] Exception in the HttpWebRequest#58892473:: - The underlying connection was closed: An unexpected error occurred on a receive.
    System.Net Error: 0 : [1236] Exception in the HttpWebRequest#58892473::EndGetResponse - The underlying connection was closed: An unexpected error occurred on a receive.

    The computer is running Windows XP SP3, and has all the updates. The funny thing is that the same application runs flawless on the rest of the computers running Windows XP. It's only one computer that has this problem.

    Any help would be appreciated.

    Friday, May 24, 2013 1:07 AM

Answers

  • I finally found the origin of the problem (and therefore the solution), after a very frustrated week. Once the connection is made, the web server that hosts the service tries to re-negotiate the SSL handshake. The SSL security provider of the computer that has the error has the re-negotiation turned off.

    I ran regedit and looked for the key HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL, and I found the values DisableRenegoOnClient=1 and DisableRenegoOnServer=1. I deleted the values and the application now is working fine (maybe I just needed to change the value to 0, but I was so angry that I not wanted any trace of these values :) ).

    • Marked as answer by azvb Saturday, May 25, 2013 6:48 PM
    Saturday, May 25, 2013 6:48 PM

All replies

  • I finally found the origin of the problem (and therefore the solution), after a very frustrated week. Once the connection is made, the web server that hosts the service tries to re-negotiate the SSL handshake. The SSL security provider of the computer that has the error has the re-negotiation turned off.

    I ran regedit and looked for the key HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL, and I found the values DisableRenegoOnClient=1 and DisableRenegoOnServer=1. I deleted the values and the application now is working fine (maybe I just needed to change the value to 0, but I was so angry that I not wanted any trace of these values :) ).

    • Marked as answer by azvb Saturday, May 25, 2013 6:48 PM
    Saturday, May 25, 2013 6:48 PM
  • Hi,

    Glad to hear that the issue is solved, and thanks for sharing your solution, it will beneficial for other community members who have similar issue.

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, May 27, 2013 2:12 AM
    Moderator
  • amazing 'azvb' it is the best solution that i have come across. Will update in afew days whether this solution worked in my case.
    Wednesday, January 22, 2014 6:22 PM