I created a WCF singleton service with netNamedPipeBinding. When a channel exception occurs, it leaves a channel in a faulty state, and all subsequent operations throws exceptions. How can I prevent this? I want that a TimeoutException, or any of the other common exceptions, to make only one operation fail, and not to make the service unresponsive.
I created a WCF singleton service with netNamedPipeBinding. When a channel exception occurs, it
Share
There is another way. You can instantiate the client proxy for each request instead of using a single instance for more than one request. This way if the channel enters a faulty state, it is discarded anyway.
This is a bit tricky because you shouldn’t dispose a channel, besides it being IDisposable.
It won’t work:
Instead you should: