Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silverlight 2.0 loading issue

I have developed a SL2 application for a client (whose computers are under pretty heavy lockdown via group policies). The SL2 application has worked fine for everyone except the client.

The client is using WinXP + IE7 and has the SL2 runtime installed.

On the client's machine the following error pops up:

Error: Unhandled Error in Silverlight
2 Application Code: 2103 Category:
InitializeError Message: 2103 An error
has occurred Code: 0

The client can load SLv1 websites like http://silverlight.net

The client can't load SLv2 websites like:

  • http://memorabilia.hardrock.com/
  • http://demos.telerik.com/silverlight/default.aspx
  • http://timheuer.com/wpfe/versiontest/

What the client sees is a blank silverlight canvas but is able to right click and bring up the silverlight preferences menu.

alt text http://img6.imageshack.us/img6/1309/hardrockerror.jpg

Any ideas on how to debug this issue or has anyone else encountered this issue?

I should add that it works fine under firefox, but their IT department is unwilling to roll out FF to all the machines. The environment must be XP + IE7

Markup:

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
            <param name="source" value="/ClientBin/RosterUI.xap"/>
            <param name="onerror" value="onSilverlightError" />
            <param name="background" value="white" />
            <param name="minRuntimeVersion" value="2.0.31005.0" />
            <param name="autoUpgrade" value="true" />
            <param name="scaleMode" value="zoom" />
            <a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">
                <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
            </a>
        </object>
like image 799
ericphan Avatar asked Mar 13 '09 05:03

ericphan


2 Answers

After months of to-ing and fro-ing the issue has been resolved - although we still don't know the true underlying cause.

The client's IT staff recently updated their transparent proxy server (which also filters content) and the silverlight app started working under IE.

One of the changes made was to permit the downloading of DLL files (which is bundled in the XAP file). They think that is the cause, although I am not 100% convinced as it doesn't quite explain why it works in Firefox (assuming it also runs through the proxy)

like image 163
ericphan Avatar answered Nov 06 '22 13:11

ericphan


I'd double check that the HTML markup that invokes the Silverlight control has the correct version number listed. If you use the ASP User Control, it should be fine. If you hand code the HTML, it should look something like this:

 <object data="data:application/x-silverlight," type="application/x-silverlight-2"
  id="silverlightHost" width="100%" height="100%">
  <param name="source" value="ClientBin/MYXAPFILENAME.xap" />
  <param name="onerror" value="onSilverlightError" />
  <param name="background" value="white" />
  <param name="initparams" value="<%= _initParams %>" />
  <param name="minRuntimeVersion" value="2.0.31005.0" />
  <param name="autoUpgrade" value="true" />
  <a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">
    <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight"
      style="border-style: none" />
  </a>
</object>
like image 1
Glen Little Avatar answered Nov 06 '22 14:11

Glen Little