I'm working on a Silverlight 3 application. It works perfectly running within Visual Studio's ASP.NET Development Server.
Now I need to make it run within SharePoint. I have the
object tag hosted within a user control and the XAP file deployed to
_layouts. I'm testing the user control in both a web part and an application page. Both result in the same error reported by Internet Explorer:
Message: Unhandled Error in Silverlight Application Could not load file or assembly 'System.Windows.Controls, Version=18.104.22.168, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. at MyNamespace.Page.InitializeComponent() at MyNamespace.Page..ctor() at MyNamespace.App.Application_Startup(Object sender, StartupEventArgs e) at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args) at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
There's nothing of help in the ULS logs or the Event Viewer. I haven't changed
web.config because I understand with Silverlight 3 that's no longer necessary.
Any ideas on what might be causing this?
Update: I've tried deploying the XAP file to a document library within the site and it works perfectly. This makes me wonder if there is some sort of CAS issue going on. I am going to try deploying the XAP to
_controltemplates in the same place as the ASCX hosting it. That location is fully trusted according to web.config.