How to configure your SharePoint extended IIS Web App for working with Silverlight 2 applications

There were a number of questions on the blog or per email regarding the configuration of the web.config in a SharePoint IIS Web app in order for the Silverlight BluePrint samples to work. Not that much though and that is of course a good sign. As I understand from it, many people are up-and-running with the samples.

UPDATE: Before you deploy your Silverlight XAPs, please recompile them using Visual Studio 2008. That should solve the problems a number of you have with the blank Web Part. 

Here is a checklist for the things you need to do:

  1. Of course, you need to download the Silverlight 2 plug-in. This can be done from here.
  2. Have service pack 1 installed for WSS 3.0 or service pack 1 for MOSS 2007. This adds support for what you're going to do with AJAX and Silverlight 2. Note that a number of the samples assume you have a publishing site up and running and therefore work only in a MOSS 2007 scenario.
  3. You'll need .NET 3.5 on your server. The System.Web.Extensions.dll is required server-side. The redistributable .NET 3.5 framework can be downloaded from here.
  4. The .NET 3.5 framework must be extended with the System.Web.Silverlight.dll. This DLL is part of the Microsoft Silverlight 2 Software Development Kit Beta 1 and if you only download this, you'll have to make sure that the System.Web.Silverlight.dll is available as an assembly in the Global Assembly Cache (GAC).
  5. For the development of Silverlight 2 applications, you'll work in Visual Studio 2008 extended with the Microsoft Silverlight Tools Beta 1 for Visual Studio 2008. Note that by installing these tools, you'll also install the required runtime and the SDK, and you should have all of the DLL's in place to get the Silverlight 2 applications delivered server-side.
  6. You need all of the .NET 3.5 (AJAX) + Silverlight configurations in the web.config. A good approach is to create in Visual Studio 2008 a Silverlight application project with a Web site to test out the XAML. The Web site includes a web.config that is ready and that contains the sections you have to copy to the web.config of the IIS Web application that hosts your SharePoint sites on which you want to try out the BluePrint samples. On the plane going back home from the conference in Seattle, I have made a screencast that illustrates this. It explains all of the steps. Download the zip containing it from here.
  7. Last but also important thing (also illustrated in the screencast) is that you have to register the .xap extension as a MIME type (application/x-silverlight-2-b1) for the IIS Web application. Don't forget that one!

I have the web.config used within the screencast available for download here in case you want to check the configurations.