tags:

views:

77

answers:

1

I'm trying to host a remote Silverlight widget in an html file that will exist locally on the hard drive, but whenever I open the html file, the Silverlight content does not show up. If I move the file to a web server and then access it through http, it works perfectly. I figured out (or at least I assume) that the widget is trying to make a call back to the web server but it's failing because of the cross zone restrictions in SL 2+. I've also seen a few reports from users talking about running into this issue when debugging from a local file. My question is, how can I tell for sure that this is the issue going on/what tools might I use to verify my hypothesis?

Additionally, (knowing full well that there are elevation of privileges security concerns to take into account) is there any way that I could declare the web services the widget calls as safe (for instance adding to the trusted sites) in such a way that Silverlight would be able to perform the calls without the security exceptions?

An example of a widget I'm talking about is below:

<object 
    type="application/x-silverlight-2" 
    data="data:application/x-silverlight-2," 
    width="400" height="400">
    <param name="minRuntimeVersion" value="3.0.40624.0" />
    <param name="background" value="#141414" />
    <param name="splashScreenSource"
      value="http://memorabilia.hardrock.com/Widget/3.2009.1014.0/Splash.xaml" />
    <param name="source"
      value="http://memorabilia.hardrock.com/Widget/3.2009.1014.0/HardRock.Memorabilia.Silverlight.Widget.xap" />
    <param name="enableHtmlAccess" value="true" />
    <param name="initParams" value="item=034739" />
    <a href="http://go.microsoft.com/fwlink/?linkid=149156&amp;v=3.0.40624.0"&gt;
        <img src="http://memorabilia.hardrock.com/Widget/3.2009.1014.0/Ping.gif?type=install&amp;item=034739" 
          style="background:#141414
           url(http://content.memorabilia.hardrock.com/Assets/Images/widget/034739.jpg)
           no-repeat center;margin:0;padding:0;border:0;" 
          width="400" height="400" />
    </a>
</object>
A: 

This is an issue of a cross protocol violation - a page with a file:// protocol cannot access assets with an http:// protocol. This also helps protect your your computer from accessed by a malicious Silverlight application.

Michael S. Scherotter
Whether it's cross zone or cross protocol, without access to the SL control or code, do you know of any way to verify the error? I don't see any errors thrown from the browser, and when I use fiddler I don't see anything in the traffic that looks useful. Perhaps said another way, is there any way to diagnose this issue other than logic and general knowledge of the access policy limitations.Furthermore, I understand why this helps protect my computer. However, if I were so inclined, is there any way that I could individually choose to make my computer less secure and make this work?
Joel