How to get a WCF ClientBase<T> in a faulted state?

258 Views Asked by At

As I remember correctly, in .NET Framework 3.x, a WCF service client (ClientBase<T>) would get a faulted state when the service returned an exception (FaultException). This could result in problems when the service client was not disposed / closed correctly. (See the many posts about this subject, like: What is the best workaround for the WCF client `using` block issue?).

This behavior has been changed! Somehow, when the service throws an exception, the service client rethrows that exception, but the client does not enter a faulted state anymore.

Two questions:

  1. Under which conditions does the service client enter a faulted state?
  2. Since when (what framework version or patch) has this behavior been altered?
0

There are 0 best solutions below