Silverlight, WPF and .NET Subscribe via RSS
Photo of Alan Cobb
About me:   I'm a Silverlight 4, WPF (Windows Presentation Foundation) and .NET programmer based in Northern California, USA.   See more about the Silverlight presentations I have been giving here.

I'm currently available for work.  Send me an email at the address here and we can talk about your project. 
How to debug Silverlight 2 cross-domain problems with Fiddler
By: Alan Cobb Date: 2008-Mar-26 15:23

A great tool for debugging Silverlight 2 cross-domain problems is the free "debugging proxy" tool called Fiddler.  Fiddler acts like an "HTTP sniffer".  It lets you watch as your browser has HTTP-conversations with servers.  This post is a very brief example of using Fiddler to "spy" on Silverlight 2 as it looks for cross-domain policy files.  For the demo I'm using ScottGu's Silverlight 2 Digg client demo.  Scott now has downloadable Silverlight 2 sources for his demo here. (I did a translation to WPF in a previous blog article.)

If you download and build Scott's SL2 demo and have Fiddler installed, you should be able to capture a "trace" of the HTTP requests made by Silverlight to the Digg site, and the responses.  In the attached screen capture of Fiddler you can see Silverlight first try to open clientaccesspolicy.xml from Digg's site and fail, but then try and succeed to open crossdomain.xml.  You can also see the contents of crossdomain.xml that were returned.  The '*' is allowing any domain to call Digg's APIs.

When it comes to testing some unknown site to see if it has cross-domain policy files, one technique is to just hit that domain with your browser and see if it can find those files.  For example, if you type this URI into the browser: http://services.digg.com/crossdomain.xml, the browser will successfully find it and show you its contents.  So their "welcome" sign has been lit.

Alan Cobb

Comments [0]  |  #  
Copyright 2014 Alan Cobb:  www.alancobb.com    Subscribe: Subscribe via RSS
Theme by Alan Cobb, based on dasBlog calmBlue.
newtelligence dasBlog 2.3.9074.18820
Page rendered: 2014-Sep-02 14:11 CA, USA Time
dasBlog logo
Search
Admin Login