Posts Tagged ‘Categories’

WCF useful links

Posted: December 5, 2010 in Categories, WCF
Tags: , ,

WCF Architecture Overview –

WCF Getting Started –

WCF 3.5 samples –

WCF 4.0 samples –

Net endpoint blog (Blog by the .NET and AppFabric teams about WCF and WF development, deployment, and management) –

WCF REST Starter Kit –

WCF Forum –

WCF Test Client – (WcfTestClient.exe)



Exception Handling in WCF

Posted: December 4, 2010 in WCF

If you are new to wcf services,an obvious mistake that you would make while writing an exception handling code is by simply using a throw in catch block thinking that client can read it.This assumption is wrong and finally it would end up in the below error message.

“System.ServiceModel.FaultException: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.”

In WCF, you should not throw standard .NET exceptions as your client could be designed in some other platform like Java which has no concept of .NET exceptions.Instead, you need to throw FaultExceptions which is the standard behavior for WCF