none
The request was aborted: Could not create SSL/TLS secure channel - Decrypt returned SEC_I_RENEGOTIATE RRS feed

  • Question

  • Our application consumes a web service in C# (.Net framework 3.5). Getting the correct response from the server most of the time, but it is intermittently throwing an error:
    The request was aborted: Could not create SSL/TLS secure channel.
     
    Having enabled the traces it shows:
     
    System.Net Error: 0 : [3688] Decrypt returned SEC_I_RENEGOTIATE.
     
    Has anyone faced this issue before? What is a fix to this problem. please let me know.
     
    Any help would be highly appreciated.
     
    Thanks in advance!
     
    -Jemo
    • Edited by Javed64 Thursday, December 29, 2011 10:26 AM
    • Moved by Crystal Wan Monday, January 2, 2012 4:05 AM to the right forum (From:MSDN, TechNet, and Expression Profile and Recognition System Discussions)
    • Moved by Michael Sun [MSFT]Microsoft employee, Moderator Wednesday, January 4, 2012 12:17 PM (From:Visual C# General)
    Thursday, December 29, 2011 10:25 AM

All replies

  • You are asking in the wrong forum.

    The C# forums are available at this link:
    http://social.msdn.microsoft.com/Forums/en-US/category/visualcsharp

    Karl


    My Blog: http://unlockpowershell.wordpress.com
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})
    Friday, December 30, 2011 3:48 PM
  • Javed, I can move this into the Forum that Karl suggested or into another specific forum.

    Thanks!


    Ed Price a.k.a User Ed, Microsoft Experience Program Manager (Blog, Twitter, Wiki)
    Saturday, December 31, 2011 8:05 AM
  • Ed, please move it to the C# forums.

    Thanks!

    Sunday, January 1, 2012 8:44 AM
  • Thanks for your post.

    I have moved this thread to this C# General forum.

    Hope your question finds an answer here.

     

    Crystal Wan

    Customer Support EPX Service Engineering Support Team

    Monday, January 2, 2012 4:16 AM
  • Hi Jemo,

    Welcome to the MSDN forum!

    We are now doing research on this issue. Your patience will be greatly appreciated. Thanks.

    Meanwhile, please refer to the following links which focus on the same issue:

    http://stackoverflow.com/questions/2859790/the-request-was-aborted-could-not-create-ssl-tls-secure-channel

    http://stackoverflow.com/questions/6232746/c-sharp-httpwebrequest-sec-i-renegotiate-intermittent-errors

    Have a nice day!

    Yoyo.

     


    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us
    Tuesday, January 3, 2012 2:29 AM
  • hi Jemo,

    Welcome to MSDN forum!

    Could you please let us know what kind of web service are you consuming?  A .NET 2.0 based ASMX web service or WCF service?  Is the service developed by your own?   Also, please provide some codes about how you consume the service at your convenience. 

    Besides, I think the references that Yoyo provided are helpful. 

       ServicePointManager.Expect100Continue = true;
       ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;

    Good day!

     


    Michael Sun [MSFT]
    MSDN Community Support | Feedback to us
    Tuesday, January 3, 2012 3:19 AM
    Moderator
  • Hi Michael, Its WCF and 3rd party.

    Following is the code for reference:

    InitializeService() //called once

    {

    ServicePointManager.Expect100Continue = true;

    ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;

    ServicePointManager.ServerCertificateValidationCallback += RemoteCertificateValidate;

    service = new TPService(ServiceURL);

     

    //Certificates are stored in the database table. Fetched at runtime and used.

    MyClientCert = new X509Certificate2(ccert, pwd);

    MyServiceCert = new X509Certificate2(scert);

    service.ClientCertificates.Add(MyClientCert);

    service.PreAuthenticate = true;

    service.AllowAutoRedirect = true;

    }

     

    public bool RemoteCertificateValidate(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error)

    {

    bool result = cert.Equals(MyServiceCert);

    Console.WriteLine("server certificate validation:" + result);

    return result;

    }

     

    //This method is called every time to get the result.

    public string RaiseRequest()

    {

    criteria.clsApp = xyz;

    ServiceResult results;

    try { results = service.GetResult(criteria); }

    catch (SoapException soapEx) { throw soapEx; }

    catch (Exception ex) { throw ex; } return results.ToString();

    }

    Most of the time this works but only fails some time giving error: "The request was aborted: Could not create SSL/TLS secure channel."

    • Edited by Javed64 Tuesday, January 3, 2012 8:40 AM code was merged
    Tuesday, January 3, 2012 8:37 AM
  • Hi Jemo,

    Based on your description, I would recommend you post the question in WCF forum and I think you will get more ideas from the WCF experts there, http://social.msdn.microsoft.com/Forums/en-US/wcf/threads.

    Wish you all the best in the new year!


    Michael Sun [MSFT]
    MSDN Community Support | Feedback to us
    Wednesday, January 4, 2012 5:49 AM
    Moderator
  • Could you please shift it to WCF forum please?

     

    Regards,

    Javed

    Wednesday, January 4, 2012 12:01 PM
  • Hi Yoyo,

     

    Any update on this?

    Could this be an issue at the Server side?

     

    Regards,

    Jemo

    Monday, January 9, 2012 9:48 AM