I
ivarley
Hi all,
In moving an app from server 2000 to server 2003, we started getting
errors from this code. It pulls a page (on the same web server) using a
web request. This is an intranet site, and integrated windows
authentication is turned on. Same exact code works fine on a Windows
2000 server.
The error is: "The remote server returned an error message: 401
Unauthorized". Can anybody point us to what might be configured wrong?
Thanks,
Ian
//--------------------------------------------------
using System.Net;
using System.IO;
//...
private string GetWebPage(string url)
{
HttpWebRequest w = (HttpWebRequest)WebRequest.Create(url);
w.Credentials = CredentialCache.DefaultCredentials;
HttpWebResponse r =(HttpWebResponse)w.GetResponse();
StreamReader webstream = new StreamReader(r.GetResponseStream(),
System.Text.Encoding.Default);
//....
}
//--------------------------------------------------
In moving an app from server 2000 to server 2003, we started getting
errors from this code. It pulls a page (on the same web server) using a
web request. This is an intranet site, and integrated windows
authentication is turned on. Same exact code works fine on a Windows
2000 server.
The error is: "The remote server returned an error message: 401
Unauthorized". Can anybody point us to what might be configured wrong?
Thanks,
Ian
//--------------------------------------------------
using System.Net;
using System.IO;
//...
private string GetWebPage(string url)
{
HttpWebRequest w = (HttpWebRequest)WebRequest.Create(url);
w.Credentials = CredentialCache.DefaultCredentials;
HttpWebResponse r =(HttpWebResponse)w.GetResponse();
StreamReader webstream = new StreamReader(r.GetResponseStream(),
System.Text.Encoding.Default);
//....
}
//--------------------------------------------------