Silverlight 3 WCF Exceptions “Down the Rabbit Hole” Presented by William Austin [email_address]
 
 
Down the Rabbit Hole
<ul><li>“ Alice discovers during her travels that things are not what they seem” </li></ul><ul><li>Her experiences in Wond...
Our Rabbit Hole Static Proxy file generation WCF Behaviors WebDev Helper IEndPoint Behavior Reference.cs HTTP Traffic snif...
Code Demo #1 <ul><li>The Happy Path </li></ul>
Summary of Demo <ul><li>Importance of clientaccesspolicy.xml </li></ul><ul><li>Default wsHTTPBinding  </li></ul>
Code Demo #2 <ul><li>Exceptions thrown on the WCF service side. </li></ul>
<ul><li>WCF FaultException<> </li></ul><ul><li>Modifying service, requires Update Service in client. </li></ul><ul><li>Ins...
Code Demo 3 <ul><li>Silverlight is hosted within the browser (mostly…) </li></ul>
<ul><li>Convert HTTP500 to HTTP200 </li></ul><ul><li>WCF Behavior, web.config, dynamic  </li></ul><ul><li>BehaviorExtensio...
Lessons learned <ul><li>WCF FaultException<>  and Silverlight3 </li></ul><ul><li>BehaviorExtensionElement, IEndpointBehavi...
Useful Article Links <ul><li>Understanding WCF Faults in Silverlight 3 </li></ul><ul><li>http://www.netfxharmonics.com/200...
Are you mad?? <ul><li>?  </li></ul>
<ul><li>“ We’re all mad here…” </li></ul><ul><li>“If you weren’t mad, you </li></ul><ul><li>wouldn’t be here” </li></ul>
Silverlight 3 WCF Exceptions “Down the Rabbit Hole” Presented by William Austin
Upcoming SlideShare
Loading in...5
×

Silverlight3 WCF Exceptions

348

Published on

How return .NET WCF exceptions to Silverlight clients.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
348
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Silverlight3 WCF Exceptions

  1. 1. Silverlight 3 WCF Exceptions “Down the Rabbit Hole” Presented by William Austin [email_address]
  2. 4. Down the Rabbit Hole
  3. 5. <ul><li>“ Alice discovers during her travels that things are not what they seem” </li></ul><ul><li>Her experiences in Wonderland challenge her understanding of the world. </li></ul>
  4. 6. Our Rabbit Hole Static Proxy file generation WCF Behaviors WebDev Helper IEndPoint Behavior Reference.cs HTTP Traffic sniffing ClientAccessPolicy.xml BehaviorExtensionElement IDispatchMessageInspector basicHTTPBinding The service returned an error : Not Found
  5. 7. Code Demo #1 <ul><li>The Happy Path </li></ul>
  6. 8. Summary of Demo <ul><li>Importance of clientaccesspolicy.xml </li></ul><ul><li>Default wsHTTPBinding </li></ul>
  7. 9. Code Demo #2 <ul><li>Exceptions thrown on the WCF service side. </li></ul>
  8. 10. <ul><li>WCF FaultException<> </li></ul><ul><li>Modifying service, requires Update Service in client. </li></ul><ul><li>Inspect HTTP traffic </li></ul><ul><li>Cast e.Error to FaultException<T> </li></ul><ul><li>… And it STILL doesn’t work. </li></ul>Summary of Demo 2
  9. 11. Code Demo 3 <ul><li>Silverlight is hosted within the browser (mostly…) </li></ul>
  10. 12. <ul><li>Convert HTTP500 to HTTP200 </li></ul><ul><li>WCF Behavior, web.config, dynamic </li></ul><ul><li>BehaviorExtensionElement, IEndpointBehavior, and IDispatchMessageInspector are your friends. </li></ul>Summary of Demo 3
  11. 13. Lessons learned <ul><li>WCF FaultException<> and Silverlight3 </li></ul><ul><li>BehaviorExtensionElement, IEndpointBehavior, and IDispatchMessageInspector </li></ul><ul><li>Silverlight runs within the browser </li></ul>
  12. 14. Useful Article Links <ul><li>Understanding WCF Faults in Silverlight 3 </li></ul><ul><li>http://www.netfxharmonics.com/2009/07/Understanding-WCF-Faults-in-Silverlight-3 </li></ul><ul><li>Consuming Web Services in Microsoft Silverlight 3 </li></ul><ul><li>http://videos.visitmix.com/MIX09/T42F (beta 3.0, up to the 30:00 minute mark) </li></ul><ul><li>Creating and Handling Faults in Silverlight </li></ul><ul><li>http://msdn.microsoft.com/en-us/library/dd470096(VS.95).aspx </li></ul>
  13. 15. Are you mad?? <ul><li>? </li></ul>
  14. 16. <ul><li>“ We’re all mad here…” </li></ul><ul><li>“If you weren’t mad, you </li></ul><ul><li>wouldn’t be here” </li></ul>
  15. 17. Silverlight 3 WCF Exceptions “Down the Rabbit Hole” Presented by William Austin
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×