M
mc
I would like to offer a section on my page which will show the "Status" of other servers on the
network, My plan was to identify a specific image on each server I want to test, do a WebRequest for
that image, and return true If I could get that image. This works when using the VS webserver but
not on my "Live" server all machines will require authentication.
The code currently throws a 401 error?
Can someone tell me what is going wrong? The server is currently configured to use Impersonation
with Windows Auth. (I've checked User.Indentity.Name from the function and it thinks it's running as
a valid user account
Alternativly does someone have a better solution for testing to see if a web server is running on a
machine?
--- My Code ---
private bool CheckUri(string p){
WebRequest theRequest = WebRequest.Create(p);
theRequest.Credentials = System.Net.CredentialCache.DefaultCredentials;
try{
HttpWebResponse theResponse = (HttpWebResponse)theRequest.GetResponse();
return true;
}
catch{
return false;
}
}
TIA
MC
network, My plan was to identify a specific image on each server I want to test, do a WebRequest for
that image, and return true If I could get that image. This works when using the VS webserver but
not on my "Live" server all machines will require authentication.
The code currently throws a 401 error?
Can someone tell me what is going wrong? The server is currently configured to use Impersonation
with Windows Auth. (I've checked User.Indentity.Name from the function and it thinks it's running as
a valid user account
Alternativly does someone have a better solution for testing to see if a web server is running on a
machine?
--- My Code ---
private bool CheckUri(string p){
WebRequest theRequest = WebRequest.Create(p);
theRequest.Credentials = System.Net.CredentialCache.DefaultCredentials;
try{
HttpWebResponse theResponse = (HttpWebResponse)theRequest.GetResponse();
return true;
}
catch{
return false;
}
}
TIA
MC