I have a WCF service that gets called from a client. When there is a data intensive back and forth between the client and the client is stopped during debugging, somehow there is exception in the service and service has to be loaded again. In my case, the service takes about 10 minutes to load up (it loads data). I’m not throwing any exception in the WCF itself. I wrapped all the service calls/functions inside “try and catch { return null }” (return null to the client instead of breaking), but the exception is still happening in the client and service breaks down.
Where is this error happening? Is this communicationexception, some random exceptions from the internals of the WCF service. I want to catch this exception and not fault the whole service (requiring 10 minute wait to restart service). Is there any tool/code to catch any and all exception inside the WCF and not make it fault. Some exceptions like network connection outage is out of our control. I’m not throwing any exceptions my self like “new Exception(“something happened”) for instance.)
Thanks for your help.
Refer to my answer here to enable tracing so that you can figure out where the exceptions are occurring in your WCF service. Beyond this, I doubt anyone can give you a solid reason as to why you are experiencing issues with your WCF service.