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
 
Back
Top