|
Hi,
I have yrl for wen service.
How to find whether it is working or not through code?
without adding webreferences, opening web page and all....
Regards,
GEM
|
|
|
You can get status code like this......
String sSourceURL = "http://localhost/testws/service.asmx";
System.Uri myUri;
myUri = new System.Uri(sSourceURL);
HttpWebRequest HttpWRequest;
HttpWRequest = (HttpWebRequest)WebRequest.Create(myUri);
HttpWebResponse HttpWResponse;
HttpWResponse = (HttpWebResponse)HttpWRequest.GetResponse();
int iStatCode = (int)HttpWResponse.StatusCode;
return iStatCode;
Regards,
GEM
|
|
|
|
|
|
|
|
|
// |