2

What is the best way to check is the WCF service exists in a given ip and port? I want to check is the server exists on client installetion

Arsen Mkrtchyan
  • 49,896
  • 32
  • 148
  • 184
  • possible duplicate of [Fastest way to check if WCF endpoint is listening](http://stackoverflow.com/questions/6592116/fastest-way-to-check-if-wcf-endpoint-is-listening) – Factor Mystic Nov 20 '12 at 04:04

2 Answers2

10

The only way to know if the "service" "exists" is to call it.

To this purpose, many services include a "Ping" operation (or perhaps a "GetServerInformation" operation) that, when called, does little or nothing, other than prove the fact that the service exists.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
5

I know you already marked an answer here, but you might consider checking out this related thread: How to check the availability of a net.tcp WCF service

There is a good alternative in there using a supported WS-Discovery method that might suit your needs, depending on your access to the service itself.

Community
  • 1
  • 1
Anderson Imes
  • 25,500
  • 4
  • 67
  • 82
  • It only transfers endpoint information, not operation information. It's pretty lightweight as long as your service doesn't have lots of endpoints. – Anderson Imes Jun 19 '09 at 21:42