Click here to load reader
Upload
william-austin
View
336
Download
0
Embed Size (px)
Citation preview
Down the Rabbit Hole
“Alice discovers during her travels that things are not what they seem”
Her experiences in Wonderland challenge her understanding of the world.
Static Proxy file generation
WCF
Beh
avio
rs
WebDev Helper
IEndPoint BehaviorReference.cs
HTT
P Tr
affic
sni
ffin
g
Our Rabbit HoleClientAccessPolicy.xml
BehaviorE
xtensionElem
ent
IDispatchMessageInspector
basicHTTPBinding
The service returned an error : Not Found
Code Demo #1
The Happy Path
Summary of Demo
• Importance of clientaccesspolicy.xml• Default wsHTTPBinding
Code Demo #2
Exceptions thrown on the WCF service side.
• 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
Code Demo 3
• Silverlight is hosted within the browser (mostly…)
• Convert HTTP500 to HTTP200• WCF Behavior, web.config, dynamic • BehaviorExtensionElement,
IEndpointBehavior, and IDispatchMessageInspector are your friends.
Summary of Demo 3
Lessons learned
• WCF FaultException<> and Silverlight3• BehaviorExtensionElement,
IEndpointBehavior, and IDispatchMessageInspector
• Silverlight runs within the browser
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
Are you mad??
?
“We’re all mad here…”
“If you weren’t mad, you
wouldn’t be here”
Silverlight 3 WCF Exceptions“Down the Rabbit Hole”
Presented byWilliam Austin