I have been working on getting Silverlight 3.0 to work with SharePoint 2007 and I wanted to share with you the progress I have made and some of the challenges I have remaining.
This project uses Silverlight 3.0, the Silverlight Toolkit for 3.0, and RIA Data Services. So it is basically using as much as it can that is new. This means we have a Entity Model and a ASP.NET web application that the Silverlight application will use. It also uses authentication using the new Domain Service for authentication.
What I did
So the first thing I did was to follow the steps in this blog post about Silverlight 2. I just changed it to be the System.Web.Silverlight from 3.0. The suggestion for upgrading the web.config for Silverlight worked great for bringing most of the stuff I needed.
I then did the following steps:
- Copied my project under the _layouts folder
- Copied the bin folder for my project to the VirtualDirectories\80\bin folder of SharePoint
- Ran gacutil on system.web.silverlight
- Ran gacutil on system.web.ria
- Ran gacutil on system.web.domainservices.webcontrols
I then made some changes to the web.config of my project, namely removing everything that was already in the web.config for SharePoint. The last change I did was to make the bin folder have FullTrust. I did this by adding the following to the wss_minimaltrust.config file:
After making these changes, the next problem I ran into was around RIA. It makes calls using a DataService.axd. So that needed to be added to the web.config file. In <system.web>:
That information is talked about in the Silverlight forum for getting it to work with Azure here.
I then tried to get my application to load the SharePoint master page but I ran into a problem where it tells me:
I am currently investigating that error and will post more as I progress. If anyone else is trying to get this to work with SharePoint or has any suggestions, I’d love to hear them.