C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » Webservices »

Webservices


Posted Date: 05 Oct 2009      Posted By: Chandra Sheker.G      Member Level: Gold     Points: 1   Responses: 2



How to check when my webservice is down.




Responses

Author: Anuraj    05 Oct 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

try
{
System.Net.WebClient cl = new System.Net.WebClient();
cl.OpenRead("url");
//Exists
}
catch
{
//Not running
}

Thanks
Anuraj
THIS POSTING IS PROVIDED "AS IS" WITH NO WARRANTIES, AND CONFERS NO RIGHTS.
BEWARE OF BUGS IN THE ABOVE CODE; I HAVE ONLY PROVED IT CORRECT, NOT TRIED IT.
dotnetthoghts



Author: Anil Kumar Pandey    05 Oct 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

create the object and call the function.
it will return the error message..

if it is down..

Thanks & Regards
Anil Kumar Pandey



Post Reply
You must Sign In to post a response.
Next : Advantage of web service
Previous : Need .net training, would like to pay
Return to Discussion Forum
Post New Message
Category: Webservices

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use