Skip to main content

Microsoft Silverlight

Answered Question Generate error message for e.Error in web service?RSS Feed

(0)

xkrja
xkrja

Member

Member

67 points

136 Posts

Generate error message for e.Error in web service?

 Is it possible to generate custom error messages which can be shown in the e.Error on the Silverlight side? Let's say I've a method in the web service that contains try-catch blocks. Can I then catch the error in the catch block so that error can be read by the silverlight app in the e.Error message?

Thanks!

Please mark as answer if you found my post useful :-)

Thanks!

Klinger
Klinger

Participant

Participant

1686 points

300 Posts

Answered Question

Re: Generate error message for e.Error in web service?

If you are using WCF and SL 3 there is a way. This video (http://videos.visitmix.com/MIX09/T42F) from MIX09 shows how.

SL3 adds support to faults and this video describes how to configure your service.

If you are not using SL3 accessing the original exception using e.Error is not an option.

In SL2 you will have to return the error as part of your service result.

 

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities