Help with Checking website availability
hi guyz! help please. How will check if a particular url/website is available or not? For example, I want to check if http://sharepoint is available? I already tried using Ping but I realized that what if the server is "up" but the IIS/Internet service is not enabled/available? so Pinging the server will not make sense. So, is there anyway to accurately check if particular url/website is available?
Re: Help with Checking website availability
Assuming the code will run under an account with appropriate rights to the server, you can use WMI to check the WWW/IIS service status, as well as individual application pool, or virtual server status. This, of course, doesn't check for errors in any requests - response parsing would be the idea here...
WMI service status: http://www.google.co.za/search?q=wmi...ient=firefox-a
Using WMI to manage IIS: http://msdn.microsoft.com/library/en..._wmi_using.asp
Re: Help with Checking website availability
Use HttpRequest or WebRequest to request the URL. Check the status that you get back, it may be 500, 404, 200, etc.
Re: Help with Checking website availability
Exactly what i need. Thanks a lot!