Andrew Connell [MVP MOSS]
1468 Posts |  40 Articles |  0 Comments
.NET  |  MCMS  |  SharePoint  |  Office System
SharePoint Quick Links
Article Categories
Archives
Post Categories


Add to Technorati Favorites

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.

  1. 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
  2. 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:
    SL2B1
  3. 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
  4. 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.
  5. 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
  6. 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. :)

Thanks to Patrick & Karine for helping out with this.

[Update 5/27/2008 @ 1:30p EDT] Fixed the link to WinMerge.

Technorati Tags: ,,
posted on Tuesday, May 27, 2008 9:34 AM

Feedback

 re: What I did to get Silverlight Working in SharePoint in Today's Webcast 5/27/2008 11:53 AM Andy
Gravatar your link to WinMerge is wrong. It should be http://sourceforge.net/projects/winmerge, not http://sourceforge.net/winmerge.

 re: What I did to get Silverlight Working in SharePoint in Today's Webcast 5/27/2008 1:06 PM Ketan
Gravatar Andrew your article is really nice (and that is as expected always from you). Thanks for sharing your knowledge. A very very small thing: the link in WinMerge is incorrect, it should be: http://sourceforge.net/projects/winmerge/

# re: What I did to get Silverlight Working in SharePoint in Today's Webcast 5/27/2008 1:26 PM Alonso Robles
Gravatar Thanks for the tips. Helped me get silverlight going in my dev environment.

# re: What I did to get Silverlight Working in SharePoint in Today's Webcast 5/27/2008 1:29 PM AC [MVP MOSS]
Gravatar Andy/Ketan-
Thanks for catching the bad link to WinMerge... it's been fixed.

 re: What I did to get Silverlight Working in SharePoint in Today's Webcast 5/28/2008 1:38 PM Jane
Gravatar Andrew, thanks for the great presentation yesterday (and today) and the blog showing the steps. This is all VERY helpful.

# re: What I did to get Silverlight Working in SharePoint in Today's Webcast 5/28/2008 11:38 PM AC [MVP MOSS]
Gravatar Jane-
Good to hear! :)

 re: What I did to get Silverlight Working in SharePoint in Today's Webcast 8/7/2008 3:57 PM Milos
Gravatar Thanks for the tutorial. I think I have everything in place, but the magick is not happening not even a blacklight ...

I am trying to set it without VS2008, but it seems like the 3.5 .net is not registered within the application management features. (Central Administration > Application Management > Manage Web Application Features )

When I try add the web part I will get an error:

Unable to add selected web part.
Silverlight Blueprint for SharePoint: The Media Viewer Web Part: Method not found: 'Void System.Web.UI.SilverlightControls.Silverlight.set_Version(System.String)'.

Thank you anyone for suggestions and help!

Cheers&Thanks

# re: What I did to get Silverlight Working in SharePoint in Today's Webcast 8/19/2008 2:47 PM Pablo Rotondo
Gravatar I have the same problem here.

Unable to add selected web part.
Silverlight Blueprint for SharePoint: The Media Viewer Web Part: Method not found: 'Void System.Web.UI.SilverlightControls.Silverlight.set_Version(System.String)'.

I'm using silverlight 2 beta 2 plugin...maybe the System.Web.Silverlight.dll in the SDK is wrong...

any suggestions? or we should wait until the final release of Silverlight 2?

Cheers from Argentina!!!



 re: What I did to get Silverlight Working in SharePoint in Today's Webcast 9/29/2008 8:17 AM mswin
Hi,

I have developed a simple webpart in .net 3.5 using asp.net silverlight control with System.Web.UI.SilverlightControls.Silverlight class. I had one .xap file to which my silverlight control is pointing to for the source. this.xap is available in the sharepoint document library.

I tried deploying this webpart to the sharepoint, but after adding the webpart to the apge the silverlight control is not showing up anything, but a blank page.I have added the MIME extensions for .xap as .xap application/x-silverlight-app and also with application/x-silverlight-2-b2, but none of them worked.

If I use any simple asp.net control like label, that is getting rendered as expected on the sharepoint page.

The Sharepoint environment used is MOSS with SP1 and SilverLight2 Beta2.

Is there anything that I am missing here.

Thanks in Advance.



Post Feedback

Title:
Name:
Email:
(email will not be displayed)
Url:
Comments: 
Please add 6 and 7 and type the answer here:    
All Comments Are Filtered & Moderated
Unfortunately comment spammers are just too effecient and are constantly dirtying up blogs with irrelevant and unwanted comments trying to improve their standing on search engines. All comments on this blog are moderated. I do not censor comments, but I don't approve comments with vulger language or those soliciting products. Most of the time comments are approved within a few hours of being submitted with the only exception when I'm traveling.

Why are you asking for my email address?
The only reason I'm asking for your email address, which isn't required to submit a comment, is to provide a gravatar if you've created an account for yourself and associated your email address with a small image. If you have a gravatar created for the email address you submit, it will appear next to your comment. Otherwise nothing will appear.

What is a gravatar?
A gravatar is a "globally recognized avatar." You can get more information about gravatars, as well as create your own for free, at www.gravatar.com. You can also view my gravatar here.


Copyright © 2003 - 2009 Andrew Connell
Creative Commons License 
This work is licensed under a Creative Commons License
Site design by Heather Solomon.

 
 
MOSS WCM Training
Looking for MOSS 2007 WCM developer training? Look no further! I teach my 5-day hands-on and online WCM classes for developers I offer through my company: Critical Path Training.

Get more information on the WCM courses!


Upcoming Classes
 Hands-on WCM:
 Online WCM:
 » July 20-24, 2009


» Register today!