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.
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:
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:
1: <CodeGroup class="UnionCodeGroup" version="1"
5: version="1" Url="$AppDirUrl$/bin/*"
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>:
3: <add path="DataService.axd" verb="GET,POST" type="System.Web.Ria.DataServiceFactory, System.Web.Ria, Version=184.108.40.206, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
4: validate="false" />
3: <add name="DataService" verb="GET,POST" path="DataService.axd"
4: type="System.Web.Ria.DataServiceFactory, System.Web.Ria, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
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:
1: The referenced file '<path to master>' is not allowed on this page.
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.