Again: The underlying connection was closed: Could not establish secure channel for SSL/TLS

J

jsanjosem

I am trying to consume a Web service from ASP.NET that requires a
certificate. The code I am using is:

WSClass obj = new WSClass();

// Load the client certificate from a file.
X509Certificate x509 =
X509Certificate.CreateFromCertFile(@"micert.cer");

// Add the client certificate to the ClientCertificates property
//of the proxy class.
obj.ClientCertificates.Add(x509);

obj.MakeCall(xxxxxxx);

The certificate is installed in my account, so I granted access to the
private key to ASPNET user using:

winhttpcertcfg -i x:\xxx\micert.pfx -p xxxx -c LOCAL_MACHINE\My -a
ASPNET

Using this method I managed to have the application work on one
machine, but I am now trying to install it on another machine (the same
as the first one, a WXPSP2 box) and I still get:

The underlying connection was closed: Could not establish secure
channel for SSL/TLS

What is it I am missing?, I followed the same process. Any ideas? Thank
you.
 
G

GCR

Even if you grant access to the private key to ASPNET user, the application
has no knowledge on the location of this key! You should configure a separate
account for running your ASP.net application and deploy the crertificate in
this account's profile.
 
G

GCR

Sorry, disregard my previous reply: did you tried installing .NET Framework
1.1 SP 1 on the secon machine?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top