Karine Bosch’s Blog

On SharePoint

Silverlight 3 Media Viewer Web Part for SharePoint

Some time ago, I created a Silverlight 2 variant on one of the Silverlight BluePrint for SharePoint samples. Since a few weeks people start to request a Silverlight 3 version. You can download the Silverlight 3 version of the web part here. The zip contains the source code for the web part and the Silverlight application. It also contains a .wsp that you can upload and deploy to your SharePoint sites.

If you want to know how to install Silvelright 3 and what you need to know before using Silverlight 3 with SharePoint, read this post.

If you want to read more details about this web part, read this post.


January 8, 2010 - Posted by | SharePoint 2007, Silverlight


  1. I am getting the error “Cannot import Media Viewer web part.” When I try to add this web part to a sharepoint page. Any ideas on how to fix this. I added the solution successfully, deployed the solution successfully, and activated the feature successfully. I just cannot edit a page and add the web part. Thanks for your help.

    Comment by Benjamin | January 13, 2010 | Reply

  2. Weird… Can you check the following things?
    – Have you installed Silverlight 3?
    – Can you find the DLL SL3.SharePoint.MediaViewer in the Global Assembly Cache?
    – If you have Visual Studio 2008, can you debug the web part by placing a breakpoint in the CreateChildControls method?


    Comment by Karine Bosch | January 13, 2010 | Reply

  3. I cannot debug the code with a breakpoint in the CreateChildControls. I tried to reload the SL3.SharePoint.MediaViewer.dll file into the GAC after rebuilding the Solution once. Redownloaded the part and tried to add and deploy the solution again. Neither of these two steps worked.

    The other two items you listed are there.

    Comment by Benjamin | January 13, 2010 | Reply

  4. Weird that you can rebuild the solution but that you can’t debug. I suppose you have Visual Studio 2008?
    When you say you can’t place a breakpoint, do you mean
    – you mean the red dot is not filled but you only have a read circle as breakpoint after having attached the sharepoint worker proces (w3wp.exe)?
    – you can place the breakpoint but the debugger never hits the breakpoint?
    – you don’t know how to debug a SharePoint web part?

    Comment by Karine Bosch | January 13, 2010 | Reply

    • It is the first option. I have the breakpoint, but it has the outline of the circle with a ! attached to it after attaching it to the SharePoint process.

      Comment by Benjamin | January 14, 2010 | Reply

  5. Have you recycled the application pool (or IISRESET) after you have added the new build of the DLL to the GAC? In general this situation means that the version in VS2008 is not the same as the one in the GAC. You can also try to right-click the breakpoint, choose Location and check the option that the versions can be different. If you do that, does the dot become solid red?

    Comment by Karine Bosch | January 14, 2010 | Reply

    • IISRESET was done and allowing for different versions in the debug did change anything.

      Does it matter that I am using WSS 3.0? The rest of my environment is Server 2003 and Visual Studio 2008 with Silverlight 3.0 and Silverlight Toolkit installed.

      Comment by Benjamin | January 15, 2010 | Reply

  6. No your installation looks ok. It is weird that you cannot install the web part properly. The only thing I can advise at this moment is, create your own web part and output a simple Hello label using the CreateChildControls method. If you can add this web part to the web part page, add the rest of the code for displaying the Silverlight application. Do you think this can work?

    Comment by Karine Bosch | January 15, 2010 | Reply

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: