I am trying to make an SSL connection with the HTTP WebRequest object using client certificates. It works just fine when I run the app from a console or gui type environment. It fails when I call it through asp.net though. My guess is that maybe it cant access the private key for the client cert but I have taken steps to try to cure that.
The certificate exists in the LOCAL_MACHINE store. I used the WinHTTPCertConfig tool to make sure IWAM, IUSR, and ASPNET accounts have access to the private key. I even put in the code to spit out the identity of the user running the assembly and that user has rights to the private key of the cert. The error i get is Unable to establish and SSL/TLS session. Any ideas on this one? Any help is appreciated. Here is a code snippet of how I am using the client cert. HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); // Load Certificate from File X509Certificate cert = X509Certificate.CreateFromCertFile(ClientCertificateFile); // Set Client Certificate for SSL Authentication if Requested request.ClientCertificates.Add(cert); The error message is unable to establish an SSL/TLS connection. thanks for any help you can offer. -Jason You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.