Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Notification type of problem in website

Status
Not open for further replies.

me64

Programmer
Jun 14, 2012
6
hi,
i need source code if in another site was problem, Notification type of problem with me
why is Offline. the reason Offline
This Should support for any website
This website is to provide services to other websites
 
Obviously, I want my site to connect to a database. This database contains the addresses of other sites. The website address to check whether the websites are down or not.
What I want and it is important to me: Must identify why the website is down (find problem)
 
How that I use in asp.net 3.5
 
You have to create a webrequest object, and make the request. There are many, many examples on line. Then you get the response back, you put that into a response object. From there you can read the response code and then interpret that from the link I sent you.
 
If you put a code sample here, I'll thank you
 
hi,
HttpRes take initialize in section Try, but i can't use HttpRes in section Catch with the same amount in Try

Code:
            try
        {
            //Code Example
            string url = "[URL unfurl="true"]http://www."[/URL] + TextBox1.Text;
            HttpWebRequest httpReq = (HttpWebRequest)WebRequest.Create(url);
            httpReq.AllowAutoRedirect = false;

            HttpWebResponse httpRes = (HttpWebResponse)httpReq.GetResponse();
          
                Label1.Text = (((HttpWebResponse)httpRes).StatusDescription);
           
            // Close the response.
            httpRes.Close();
catch
        {

            Label1.Text = (((HttpWebResponse)httpRes).StatusDescription);
               
        }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top