HttpWebRequest and HTTPS

  • Thread starter Thread starter Q. John Chen
  • Start date Start date
Q

Q. John Chen

Group,

I did the following using XMLHTTP (VB6 client)
o.XmlHttp.Open "POST", _
"https://wwww.mycompany.com/getinfo.ashx", _
False, "user.id", "password"

Now I am trying to do the same in .NET/C# with HttpWebRequest but I
don't how to set the authentication. I see mention of Authentication
Header but can't find the details.

Thanks

John
 
Use the HttpWebRequest.Credentials property. Assign it something like "new
NetworkCrentials("brock", "mypassword")", or is you want the current user's
credentials use CredentialsCache.DefaultCredentials.

-Brock
DevelopMentor
http://staff.develop.com/ballen
 

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

Back
Top