Topic Thread

Expand all | Collapse all

"The request was aborted: Could not create SSL/TLS secure channel."

Jump to Best Answer
  • 1.  "The request was aborted: Could not create SSL/TLS secure channel."

    Posted 05-31-2019 12:21
    ​Hi,

    I'm trying to read items from a Sharepoint List using CSOM (Client Side Object Model, Microsoft.Sharepoint.Client.dll).
    The Sharepoint requires ssl authentication (https), but the call works fine even without passing any credentials or X509 certificate when I invoke it from my Visual Studio environment.
    If I use the same code however in a code stage in Blue Prism (on the same virtual machine), I'm getting:
    "The request was aborted: Could not create SSL/TLS secure channel."

    It's a bit difficult to debug the issue in Blue Prism and as I cannot reproduce the error in Visual Studio I'm a bit stuck.

    Anyone any idea?

    ------------------------------
    Cheers Astrid
    ------------------------------


  • 2.  RE: "The request was aborted: Could not create SSL/TLS secure channel."

    Posted 06-03-2019 05:52
    Check out the current user in Visual Studio. Pretty sure you might've signed in to the  sharepoint site.

    ------------------------------
    Gopal Bhaire
    Analyst
    Accenture
    ------------------------------



  • 3.  RE: "The request was aborted: Could not create SSL/TLS secure channel."
    Best Answer

    Posted 06-03-2019 14:15
    Alright, I cannot really explain why but adding the following lines to my code (in Blue Prism) resolved the issue:

    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
    | SecurityProtocolType.Tls11
    | SecurityProtocolType.Tls12
    | SecurityProtocolType.Ssl3;

    In Visual Studio (which is installed on the same VM where I tested the Blue Prism code and uses .Net Framework V4.7 as well) it worked without explicitly defining the SecurityProtocol values....

    ------------------------------
    Cheers Astrid
    ------------------------------



  • 4.  RE: "The request was aborted: Could not create SSL/TLS secure channel."

    Posted 06-04-2019 14:44

    Hi Astrid,

    Blue Prism is configured to only use TLS 1.2 protocol by default. In your scenario it appears SharePoint is not configured to utilise the TLS 1.2 protocol and when the TLS/SSL handshake takes place between Blue Prism and SharePoint they cannot find a mutual TLS version to use for the communication. This results in the error you are seeing. 

    The code you have placed into the code stage is forcing Blue Prism to allow older versions of TLS and SSL protocols, I wouldn't recommend enabling all protocol versions but the ones you need, you can see how to determine what TLS version is being used by following this stack overflow article: https://security.stackexchange.com/questions/19096/how-to-determine-if-a-browser-is-using-an-ssl-or-tls-connection e.g. 
    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11
    | SecurityProtocolType.Tls12

    Further information can be found here:

    http://portal.blueprism.com/customer-support/support-center#/path/1150114562

    Regards,



    ------------------------------
    James Marsh
    Technical Consultant
    Blue Prism
    Europe/London
    ------------------------------



  • 5.  RE: "The request was aborted: Could not create SSL/TLS secure channel."

    Posted 06-04-2019 15:00

    Thanks a lot for the explanation, James!

     

    Cheers,

    Astrid






  • 6.  RE: "The request was aborted: Could not create SSL/TLS secure channel."

    Posted 11-25-2019 14:34
    Hi,

    I am trying to make a Mutual SSL Webservice call where I am using a pem certificate to make the call. I am currently using Blueprism 6.4.3, can you please suggest how I can get this thing implemented.

    Thanks
    Sanjeev

    ------------------------------
    sanjeev rout
    Advanced App Engineering Specialist
    Accenture UK
    Europe/London
    ------------------------------



  • 7.  RE: "The request was aborted: Could not create SSL/TLS secure channel."

    Posted 11-25-2019 14:50

    Are you trying to communicate out of Blue Prism to a SOAP web service or are you communicating externally into a Blue Prism process or object? 



    ------------------------------
    James Marsh
    Technical Consultant
    Blue Prism
    Europe/London
    ------------------------------



  • 8.  RE: "The request was aborted: Could not create SSL/TLS secure channel."

    Posted 11-25-2019 14:57
    I want to make a call to third party API from Blueprism.
    Currently I have implemented the call using CURL. From Blueprism I make a call to client server, I pass the .pem, .cer and .crt file as part of CURL call to client server and get the output as a JSON File.

    Now I want to get rid of CURL and implement everything in Blueprism VBO. Can you please help me?

    ------------------------------
    sanjeev rout
    Advanced App Engineering Specialist
    Accenture UK
    Europe/London
    ------------------------------



  • 9.  RE: "The request was aborted: Could not create SSL/TLS secure channel."

    Posted 12-23-2019 12:29
    Edited by Amandeep Malhotra 9 days ago
    Hi,

    I'm facing a similar issue, but the code throws the same error even after enabling all protocol versions.

    Here's my code:
    resultData="";
    
    try
    {
    
    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
    	| SecurityProtocolType.Tls11
    	| SecurityProtocolType.Tls12
    	| SecurityProtocolType.Ssl3;
    ServicePointManager.ServerCertificateValidationCallback = new        
    RemoteCertificateValidationCallback
    (
       delegate { return true; }
    );
    WebClient client = new WebClient();
    client.UseDefaultCredentials = true;
    String htmlCode = client.DownloadString(addressURL);
    resultData = htmlCode;
    
    
    	Success=true;
    	Message="";
    
    }
    catch(Exception e)
    {
    	Success=false;
    	Message=e.GetBaseException().Message;
    }
    I also tried removing ServerCertificateValidationCallback, still no luck.

    Protocol version being used by server: TLS 1.2, AES with 256 bit encryption (High); DH with 1024 bit exchange (looked up in IE)

    Any idea what might help??

    Thanks.

    ------------------------------
    Amandeep Malhotra
    Blue Prism Developer
    Barclays Technology Centre India
    Pune, Maharashtra
    ------------------------------