Is there a way to test, from my code on a client machine, whether my WebService is up and running, without having to invoke a WebMethod on the service ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Do you include “fetching the WSDL” as “invoking a WebMethod”? That would be a fairly simple way of checking without touching anything within the web service code itself… but if you want an even more hands-off approach than that, you need to work out what you’re actually trying to test. For instance, you could connect to port 80 (or whichever port your web server is running on) but that wouldn’t tell you much.
The more invasive you are, the more confident you can be that the web service is actually running. For example, fetching the WSDL as I suggested earlier doesn’t mean that the web service will manage to respond to requests properly: it might be trying to use an invalid database connection string, for example.
You might want to include a “Test” web method which can be used for some basic diagnostics. Think about the security aspect though, which will partly depend on how the web service is being deployed. (Is it for a LAN or a WAN, for example?)