HttpWebRequest Post with ClientCertificates working in Debug and VS, but not working in IIS



Hi,

Anyone's help is really appreciated!

VS05 with .net 2.0, on Windows XP/2003 IIS 5/6, on ASP,

When post a HttpWebRequest with client ceritificate

X509Certificate cert =
X509Certificate.CreateFromCertFile(certFile);

Response.Write("Loaded cert: " + cert.GetName() + ": " +
cert.GetIssuerName() + ", Hash:" + cert.GetCertHashString());

HttpWebRequest objRequest =
(HttpWebRequest)WebRequest.Create(url);

objRequest.ClientCertificates.Add(cert);

It works well in C# windows program, or ASP.net. In ASP.net, when it
is in debug mode, it works.

However, when I put the aspx into wwwroot, then the client certificate
is not being sent along with the request. Given that I have printed
out the cert info, and multiple attempts on permission, it seems like
HTTPWebRequest is not sending the client certificate.

Anyone has similar issue? Any tools that can assist me to troubleshoot
the issue?

Really appreciated!

Cheers,
Calebmei

.



Relevant Pages

  • Re: Disable requesting client certificate when running in SSL
    ... I assigned my cert out of a W2K3 Enterprise CA for the domain ... to impersonate ADAM users in Extranet usage). ... > to have it automatically disable the client certificate ...
    (microsoft.public.windows.server.active_directory)
  • Re: HttpWebRequest and SSL client certs in the Local Computer store
    ... I know the cert is on the machine properly b/c when I go ... > client that does not use WSE 2.0 but uses HttpWebRequest directly. ... > store of the Local Computer. ...
    (microsoft.public.dotnet.security)
  • Re: Could not establish secure channel for SSL/TLS.
    ... I hate troubleshooting client cert stuff. ... server that requires a client certificate. ... HttpWebRequest req = WebRequest.Create; ...
    (microsoft.public.dotnet.security)
  • Re: SSL Problem
    ... You mean you didn't require client certificate, ... > Although the cert works, on -some- users PC's they receive a "CLIENT ... > AUTHENTICATION" pop-up dialog box asking them to select their cert they ...
    (microsoft.public.inetserver.iis.security)
  • Re: How do we get the private key to do digital signature?
    ... If IE finds more than one valid cert it ... You will need to pop a dialog on your client, or else code searching his MY ... then in my vbs code, I search the key store, and find the ... corresponding client certificate and submit it. ...
    (microsoft.public.platformsdk.security)