Thursday 3 November 2011

Installing the SharePoint BluePrint for Silverlight: SilverlightPart

First off, Silverlight 2.0 is still beta so you should not install it on a production server, but for those who want to throw caution into the wind (it will be blown back in your face like me), here are the steps I went through for a non-development environment (i.e. no Visual Studio 2008 installed).
If you have tried to get this working before reading this post and just got a blank web part then step 5 is probably the solution.
If you just install the Silverlight BluePrint samples onto a SharePoint Server, they will not work because the following dependencies must be installed:
  1. Install .Net 3.5 framework http://www.microsoft.com/downloads/details.aspx?FamilyID=333325fd-ae52-4e35-b531-508d977d32a6&DisplayLang=en
  2. Silverlight plugin (yes, this must be installed on the server)
    http://www.microsoft.com/silverlight/resources/installationFiles.aspx?v=2.0
  3. Silverlight 2 Beta 1 SDK
    http://www.microsoft.com/downloads/info.aspx?na=90&p=&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=4e03409a-77f3-413f-b108-1243c243c4fe&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f4%2f1%2fb%2f41b00352-1a7f-48bb-be51-b9cef025ca11%2fsilverlight_sdk.exe
  4. Copy the System.Web.Silverlight.dll from C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Libraries\Server to c:\windows\assembly
  5. Check the /ClientBin/ directory of you SharePoint site for the existence (and correct version) of Silverlight.js (if missing, copy it from C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Tools)
  6. On W2K8 grant Machine\Users Read/Execute, Read and  List Folder Contents to the ClientBin directory otherwise you get 403 error when the SilverLightPart web part properties tries to browse to the .XAML and .JS files.
  7. Register the MIME type for file extension .XAP in IIS (the W2K8 registraion is not correct for SL2B1)
Perform an IISReset and you should now be able to add the SilverlightPart (1st demo from http://www.ssblueprints.net/sharepoint/) to a page. If you get a blank web part, step 5 above fixed this for me, if not it appears the only option is to recompile the web parts in VS 2008 (a bit tricky if you don't have such a development server).
Sample page hosting a Silverlight 1.0 Hello World XAML demo http://www.wssdemo.com/pages/silverlight2.aspx?PageView=Shared
The other samples require AJAX support so you will have to install ASP.Net 3.5 make major changes to your web.config file. I'll post steps for doing this on a non-developer SharePoint platform soon.

No comments:

Post a Comment