D
Deepak
Hi Experts,
I have a page in my inetpub\wwwroot called testpage.asp. I have removed
anonymous access to this page and have checked windows integrated security.
Now when I try to access this page from code I get a 401 error. Why is this?
I am able to acces the page from IE without any problem. what can do to get
around this problem.
here's my code :
try
{
WebClient wc = new WebClient();
NameValueCollection nvc = new NameValueCollection();
string uri;
uri = "http://localhost/testpage.asp";
NetworkCredential nc = new NetworkCredential("raj","");
wc.UploadValues(uri,nvc);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
I have a page in my inetpub\wwwroot called testpage.asp. I have removed
anonymous access to this page and have checked windows integrated security.
Now when I try to access this page from code I get a 401 error. Why is this?
I am able to acces the page from IE without any problem. what can do to get
around this problem.
here's my code :
try
{
WebClient wc = new WebClient();
NameValueCollection nvc = new NameValueCollection();
string uri;
uri = "http://localhost/testpage.asp";
NetworkCredential nc = new NetworkCredential("raj","");
wc.UploadValues(uri,nvc);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}