views:

339

answers:

2

Hi

How to handle the WCF fault exception in Silverlight 3.0 .Any in built object model support for fault exception handling?.Please give me details

Thanks Sekar

A: 

Since all your calls to your web service will be async. The service reference to your WCF project will automatically create "completed" events for you on the client when the async call has been completed.

These events always contain a "Result" property and an "Exception" property. Once the exception is handled you can do what you want with it.

Is this what you mean?

vidalsasoon
No.The silverlight platform does not supporth SOAP fault . But MSDN article says 3.0 supports the WCF fault exception. IF support how to capture the Fault Excetpion
Web services all throw the same "System.ServiceModel.FaultException" by default (C#, Java, whatever). Its the only one that all SOAP capable platforms understand. This FaultException can then contain your language specific exception details.
vidalsasoon
btw: http://blogs.msdn.com/silverlightws/archive/2009/03/20/what-s-new-with-web-services-in-silverlight-3-beta.aspx
vidalsasoon
A: 

Try this:

http://www.codeproject.com/KB/silverlight/SilverlightExceptions.aspx

You're right that SOAP faults are not supported, this technique wraps them on the server side then unwraps them on the client so you can handle them neatly.

James Cadd

related questions