Silverlight3 WCF Exceptions
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Silverlight3 WCF Exceptions

  • 561 views
Uploaded on

How return .NET WCF exceptions to Silverlight clients.

How return .NET WCF exceptions to Silverlight clients.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
561
On Slideshare
558
From Embeds
3
Number of Embeds
2

Actions

Shares
Downloads
2
Comments
0
Likes
0

Embeds 3

https://www.linkedin.com 2
http://www.linkedin.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

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