locked
The request was aborted: Could not create SSL/TLS secure channel. RRS feed

  • Question

  • User686179636 posted

    Hello word,

     

     I have configured my web site to use SSL with a server certificate and also to require client certificates

     When I hit the page I'm able to see the login page, but when after I authenticate my application calls a web service located on the same computer, and this is where I get the exception :

     

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

     

    This is how I'm passing the client certificate to the web service.

    (I downloaded the Web Services Enhacement 3.0 and for testing purposes I'm using impersonation and I'm logged in as local Administrator)       


                                            

     ServicePointManager.CertificatePolicy = new TrustCertificatePolicy();
    SessionManager.Service objSessionManager = new SessionManager.Service();

    objSessionManager.Credentials= System.Net.CredentialCache.DefaultCredentials;

    // WSE 3.0 method X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
    store.Open(OpenFlags.ReadOnly);

    string findValue = "myCompany";
    X509Certificate2Collection certsCollection = store.Certificates.Find(X509FindType.FindByIssuerName, findValue, false);

    X509Certificate2 cert;
    if (certsCollection.Count > 0)
    {
    //Check for the right certificate cert = certsCollection[0]; objSessionManager.ClientCertificates.Clear(); objSessionManager.ClientCertificates.Add(cert); } string value = objSessionManager.SetCredentials(UserName, Password);
      
     

     

    But I'm getting the exception:

     

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

     

    When I call myWebService.Method() -----> objSessionManager.SetCredentials(UserName, Password);


    Any help would be appreciated, thanks !

    Thursday, May 3, 2007 4:41 PM

Answers

All replies