tags:

views:

280

answers:

1

Is it possible to catch an EndpointNotFoundException when calling an asynchronous method in WCF? I've wrapped the service call on my client in a try / catch block, and am catching EndpointNotFoundExceptions, FaultExceptions and general Exceptions, but if the service disappears once the client is running, no exception is caught on the async call, but eventually a timeout occurs.

What is the best way (or is there a way) to quickly catch a dead service during an async call?

A: 

This has been open a while now with no action. I guess the answer basically is to set your timeout as low as possible given the network type / amount of processing expected / etc. One possibility is to set up one endpoint with a very short timeout (eg 5 seconds) with just a 'Ping' method as a heartbeat. Use the client to call and monitor this method periodically to get the health of the server / endpoint. As Simon Fox pointed out, check http://stackoverflow.com/questions/1204534 for a more detailed response.

Darren Oster