For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET Webservices > December 2005 > RE: Again: The underlying connection was closed: Could not establish s









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: Again: The underlying connection was closed: Could not establish s
GCR

2005-12-07, 4:03 am

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.
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com