In today’s MSDN webcast, Introduction to SharePoint for .NET Developers: Silverlight & SharePoint, one of many in the Introduction to SharePoint for .NET Developers series, you’ll see Silverlight 2.0 Beta 1 working within SharePoint. One thing you won’t see is me configuring the virtual machine (VM) so that I can not only do Silverlight development in the VM but also to have it run within a SharePoint site. I thought it would be helpful to understand what I had to do to make this work.
- First I am using the WSS 3.0 SP1 Developer Evaluation VPC Image that was posted on May 15, 2008 and can be downloaded from the Microsoft Downloads Center. Note it’s a whopping 3.4GB compressed: http://www.microsoft.com/downloads/details.aspx?FamilyID=1beeac6f-2ea1-4769-9948-74a74bd604fa&displaylang=en
- Then I got the Silverlight 2.0 Beta 1 plugin installed in my browser. To get this, go to http://www.microsoft.com/silverlight & click the Install link in the menu. In the lower right hand corner you’ll see Try Silverlight 2 Beta 1 as shown. Below… get that installed:
- Next, I downloaded the Microsoft Silverlight Tools Bet 1 for Visual Studio 2008. This will let you develop Silverlight 2 applications in Visual Studio 2008 & also installs the Silverlight 2 SDK: http://www.microsoft.com/downloads/details.aspx?FamilyId=E0BAE58E-9C0B-4090-A1DB-F134D9F095FD&displaylang=en
- Next, I deployed the Silverlight assembly (System.Web.Silverlight.dll) to the GAC. This can be found in the C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Libraries\Server folder which was added by the install in the previous step.
- Then I added a new MIME type for the Silverlight controls to the Web site in IIS. Open a Web application in IIS and right-click, selecting Properties. Then select HTTP Headers » MIME Types and add the following:
- Extension: .xap
- MIME Type: application/x-silverlight-2-b1
- Finally, the last thing you need to do is add a bunch of stuff to the web.config for ASP.NET 3.5 (as Silverlight uses some of the extensions stuff) and the Silverlight assembly. Easiest way to do this IMHO is to grab this web.config that I used used in the webcast and use a tool like WinMerge against a vanilla web.config in a SharePoint Web application to view the changes.
That’s it! OK, you can stop laughing now. Remember, we’re still in a beta. :)
Page update history / changelogThis page has been updated since it was originally published. The following list details each change and when it occurred.
- Tuesday, May 27, 2008 - 1:30 PM
Fixed the link to WinMerge.