tags:

views:

256

answers:

3

I am browsing silverlight applications. Where can I find the corresponding xap files? Are they in the browser cache on somewhere else? I am trying to look at xap files written by others. I used fiddler to look for xap files or html files containing xap files. Found nothing. For example, how can I find the xap files for bing maps or Office web applications?

+2  A: 

You need to look in the source code of the html page hosting them. Usually they are linked in the object tag. I'd just do a view source and then search for xap.

Doing a quick search for "xap" on the Bing page source shows:

<param name='source' value='http://maps.slapi0.virtualearth.net/explore/ClientBin/20091021.1321/Microsoft.Maps.Shell.xap' />

There is your xap file. You could also use Silverlight Spy to find embedded Silverlight apps in pages as well.

Bryant
I tried this but the html page can be awfully complex. For example, I am unable to find the xap files for bing maps or office web apps
tom greene
There is the one for bing maps. I don't have the url for the office web apps.
Bryant
Bryant, thanks for finding the bing map xap file. I tried SilverlightSpy but it says "it looks like this version is not supported" when accessing the office web apps. Any idea why this would be?
tom greene
A: 

By default, Visual Studio puts them in the ClientBin sub-directory of the HTML or ASPX file.

In the HTML source, you should see some lines that looks like this:

<div id="silverlightControlHost">
 <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
     <param name="source" value="ClientBin/SilverlightApp.xap"/>

The "ClientBin/SilverlightApp.xap" will point to the .xap file.

JML
A: 

As @JML and @Bryant mentioned, the url to the xap file can be found by looking at the html source in the object tag

The browser should stored the xap in the typical browser cache.

I just tried using fiddler with IE and I saw the xap file come across, I'm not sure why you are not seeing it. If you are using firefox, are you sure you have fiddler enabled?

Jacob Adams
I see the xap file for any silverlight app but not the Office web apps
tom greene