If there are any issues or errors from our Main web site, a page (router) will determine which of the two support sites (SupportMain site and SupporSecondary site) to redirect the user to. By default we will route the user to the SupportMain site if it is available otherwise route the user to the SupportScecondary site. I am using the function below to determine whether a web site is up. The functionality seems to work locally but I am getting error 401 when the Main site hosted on the server (MS server 2008 with IIS 7.5). There seems to be somekind of security problem but i could not figure it out so i can use some help from the experts.
Did i handle it correctly? Or is there a best practice for determine if a website is up besides the codes that i used (see below)?
Note: i did try to pass in my credential as well but i got the same error.
Here is the code from the Main web site:
string site1 = "http://MainSupportSite/Defau ...
Go to the complete details ...