foreach (string site in websites)
{
//CampusWebstoreWebService.WebGlobalMethodsSoapClient wbmsc = new CampusWebstoreWebService.WebGlobalMethodsSoapClient();
//bool isavail = wbmsc..NameIsAvailable("max");
string sitetemp = site + "/booksearch.aspx";
HttpWebRequest request = null;
Uri uri = new Uri(sitetemp);
request = (HttpWebRequest)WebRequest.Create(uri);
string siteup = "";
HttpWebResponse response = null;
try
{
response = (HttpWebResponse)request.GetResponse();
if (response.StatusCode == HttpStatusCode.OK)
{
siteup = "site is up (" + response.StatusCode.ToString() + ")";
Stream responseStream = response.GetResponseStream();
StreamReader reader = new StreamReader(responseStream, Encoding.UTF8);
string html = "";
try
{
html = reader.ReadToEnd();
}
finally
{
reader.Close();
}
// <select name="ctl00$ContentPlaceHolder1$dlStore" id="ctl00_ContentPlaceHolder1_dlStore" disabled="disabled" title="Store" style="text-align: left">
// <option value="NULL">Select Campus...</option>
// <option selected="selected" value="1">KSU ASHTABULA</option>
//</select>
}
else
{
siteup = "site may have a problem (" + response.StatusCode.ToString() + ")";
}
}
catch (System.Net.WebException we)
{
siteup = ".......................... 404 site not found";
}
textBoxStatusMessagesWebsites.Text += site + " ... " + siteup + System.Environment.NewLine;
}
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE