R
Raj
Hi All
Here's my situation. I have a ASP page which requires windows authentication. The page works fine when I access it from IE and I am able to login succesfully.
Now I am writing some .NET code to access the page. I pass in some data for the form. I always get a 401 error. I am looking for some pointers/sample code that tells me how I can pass windows login credentials to my ASP page. I did try NetworkCredentials but that fails. Below Is my code
WebClient wc = new WebClient()
NameValueCollection nvc = new NameValueCollection()
nvc.Add("cmdSubmit","send")
nvc.Add("txtMsgText","Test Message")
byte[] buffer
buffer = wc.UploadValues(uri,"POST",nvc)
string streamReader
streamReader = System.Text.Encoding.Default.GetString(buffer)
Help will be appreciate
Thank
Raj
Here's my situation. I have a ASP page which requires windows authentication. The page works fine when I access it from IE and I am able to login succesfully.
Now I am writing some .NET code to access the page. I pass in some data for the form. I always get a 401 error. I am looking for some pointers/sample code that tells me how I can pass windows login credentials to my ASP page. I did try NetworkCredentials but that fails. Below Is my code
WebClient wc = new WebClient()
NameValueCollection nvc = new NameValueCollection()
nvc.Add("cmdSubmit","send")
nvc.Add("txtMsgText","Test Message")
byte[] buffer
buffer = wc.UploadValues(uri,"POST",nvc)
string streamReader
streamReader = System.Text.Encoding.Default.GetString(buffer)
Help will be appreciate
Thank
Raj