Reputation: 25651
I have a SL 3.0 xap I want to host in a ASP.NET website, I have access to the XAP file and I have created a HTML page to host the SL component.
When I access the page all I see is a white screen where the SL component should be, SL is loaded but the component is not displayed.
Any ideas why this is happening?
This is the HTML code for the SL div.
<body>
<form id="form1" runat="server" style="height:100%">
<div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="http://lonmw32795/SliverlightRESTfulWebservice.Web/ClientBin/SliverlightRESTfulWebservice.xap"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="3.0.40818.0" />
<param name="autoUpgrade" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40818.0" style="text-decoration:none">
<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
</a>
</object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
</form>
Cheers
AWC
Upvotes: 2
Views: 3141
Reputation: 21
I have seen this behavior when the app throws a XAML error. Take a look in App.xaml.cs and find Application_UnhandledException. To get you started just add a: MessageBox.Show(e.ExceptionObject.Message) in this method instead of writting to the DOM.
Upvotes: 0
Reputation: 1993
Are you sure that you are not having Default.aspx as your startpage and that the SL object is inside one of the generated testpages?
Upvotes: -1
Reputation: 11297
Watch out for javascript errors to give you more information.
Often the error is that the IIS is not configured to handle XAP files appropriately: Configuring IIS for Silverlight Applications
Upvotes: 3