Chris’s SharePoint Reflections

Just another WordPress.com weblog




  • Chris Zhong

    IT consultant Australia








Silverlighting with SharePoint

Posted by chrissyz on June 15, 2008

Silverlight is so cool. I can forsee a great future of building RIA for the next generation using Silverlight, especially in Sharepoint. As we all know, sharepoint looks and feels is very sharepointy. It takes great effort to “sexy it up”. Integration with Silverlight will be a good potential solution, specially in BI area such as dashboard. Microsoft is really pushing it as well. They provide “Silverlight for SharePoint BluePrint” with six demo samples to get you a jump start. I have been playing with it last couple of weeks. Honestly, the configuration is not easy, but it worth the effort! I normally don’t want to get too technical in my blog, but this time is exception. Here is the detailed checklist to configure your SharePoint environment to run silverlight webpart.

Assumption:

Enviroment requirement:

  • WSS 3.0 + SP1 or MOSS 2007 + SP1
  • VS 2008 or VS2005 + .NET 3.5
  • ASP.NET 2.0 AJAX Extension 1.0
  • Microsoft Silverlight Tools Beta 1 for VS 2008. This download will also automately install Silverlight 2 Beta 1, Silverlight 2 SDK Beta 1 and KB949325 for VS 2008 for you. Make sure you uninstall all the previous silverlight versions before you install this one
  • Drag system.web. silverlight.dll into GAC after the installation

Configuration:

  • Change the web.config (Follow legendary Patrick’s screencast). Besides that, you need to add an extra safe control in the web. config in order to run the script manager if AJAX technology has been used (Like Navigation Control Demo in the blue print)

<SafeControl Assembly=”System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35″ Namespace=”System.Web.UI” TypeName=”*” Safe=”True” />

  •  Register .xap extension as a MIME type (application/x-silverliget-2-b1) for IIS (This one also demostrates in Patrick’s screencast)
  • If the web part is blank, recompile the project which will automatically produce a solution file. The new .xap file normally 2k bigger than the old one. Repalce the new .xap file for the old ones (Intpub/wss/virtual directory/site name/clientbin and Intpub/development/)
  • By the way, if you are trying to make the navigation control work, you will get a error message saying unable to load the assembly SL.Controls.Navigation.Dll. Don’t panick, as this is because the assembly’s publich key token is wrong.  All you need to do is:
  1. open the blueprint.master. 
  2. Locate the line <%@ Register TagPrefix = “SL” Namespace = “SL.Controls.Navigation” Assembly=”SL.Controls.Navigation, Version=1.0.0.0, Culture = neutral, PublicKeyToken=”4aec304184eb9a69″%>.
  3. Change the PublicKeyToken 4aec304184eb9a69 to bb99f30c0098259c.

Then it goes live!!!!

Although silverlight has some drawbacks and not very mature and stable at this stage, remeber it only starts and has a long but very promising future ahead of it.  Microsoft is putting a lot of effort on improving it. Give it a go and you will love it!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: