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

C

calebmeii

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
 

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,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top