How to check if a web service is up and running without using ping?
问题 How can i check if a method in a web service is working fine or not ? I cannot use ping. I still want to check any kind of method being invoked from the web service by the client. I know it is difficult to generalize but there should be some way. 回答1: I use this method and it works fine : public bool IsAddressAvailable(string address) { try { System.Net.WebClient client = new WebClient(); client.DownloadData(address); return true; } catch { return false; } } 回答2: The only way to know if a web