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

I'm currently available for Silverlight or WPF contract 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]  |  #  
SD-West-2008 PPT Slides for My "Introduction to Silverlight" Presentation
By: Alan Cobb Date: 2008-Mar-06 19:14

I'm doing an "Introduction to Silverlight" presentation tomorrow (2008-Mar-07) at SD-West-2008 in Santa Clara, California focusing on the .NET based Silverlight 2.

Here are my PowerPoint slides (5.3MB).

Alan Cobb

Comments [2]  |  Silverlight #  
Copyright 2008 Alan Cobb:  www.alancobb.com    Subscribe: Subscribe via RSS
Theme by Alan Cobb, based on dasBlog calmBlue.
newtelligence dasBlog 2.0.7180.0
Page rendered: 2008-Aug-21 16:24 CA, USA Time
dasBlog logo
Search
Admin Login