|
| 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.
"jsanjosem@gmail.com" wrote:
> 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.
>
>
|
|