Test availablity of WCF URL

2019-06-03 04:29发布

问题:

I am trying to test the availablity of WCF service as a part of a tool. Is it possible or do I have to call a method inside that WCF to really test that? I have tried client.downloadurl(wcfurl) but it is failing.

Any Ideas?

回答1:

To test the existence of a WCF service all you need to do is enter the url of the service into a browser:

http://www.yourdomain.com/yourservice.svc

You should be able to make the same http request in code and check the response. If it's OK then the service exists.

This doesn't check the methods on the service though.



回答2:

Create a HTTP request using the URL of your service. Don't forget to set the timeout. The response code 200 means it is all OK



回答3:

I would try this tool from microsoft.
They provide you this, simply launch the tool and you will see the available methods as exposed on your IService. http://msdn.microsoft.com/en-us/library/bb552364.aspx

You can provide the IService code for feedback.