I\'ve got a GUI client which is running against a WCF services hosted as a Windows service on a server box. The WCF service is running in PerCall InstanceContextMode, and the cl
You can take a look at this to perhaps avoid some of that boilerplate code:
http://wcfproxygenerator.codeplex.com
The best would be to avoid the exceptions on the server all together. If a WCF Server encounters an exception that is not being caught and handled, it will "fault" the channel, rendering it useless.
On the server side, you can implement the IErrorHandler interface and catch .NET exceptions, turning them into SOAP faults which will be handed back to the client more gracefully, without faulting the channel.
That way, you can catch all .NET exceptions on the server, and convert them into interoperable SOAP faults which will not cause these problems.
For more information, see: