Back to Technical Posts
Silverlight SharePoint

Creating Silverlight 1.1 Applications for SharePoint with VS2008

Step-by-step guide to building Silverlight 1.1 applications with Visual Studio 2008 and hosting them in SharePoint 2007. This translation of Janne Mattila's tutorial shows how to create a Web Part host for Silverlight without modifying the SharePoint environment directly.

Attribution: This post is a Spanish-to-English translation of Janne Mattila's excellent tutorial on Silverlight and SharePoint development. Janne's blog consistently features advanced and useful SharePoint content.

Overview

This tutorial demonstrates creating a Silverlight 1.1 application with Visual Studio 2008 and running it inside SharePoint. Rather than installing components directly in the SharePoint environment, we'll create a Web Part to host the Silverlight application. All development happens outside SharePoint, keeping the production environment clean.

Prerequisites

Development Environment

  • ✅ Visual Studio 2008 running on Windows Vista
  • ✅ Microsoft Silverlight 1.1 Tools Alpha for Visual Studio 2008 - adds Silverlight project templates
  • ✅ SharePoint 2007 in Virtual PC connected to host machine

Recommended Reading

  • • silverlight.net - Official Silverlight documentation and getting started
  • • Coding4Fun Silverlight 8-Ball Example - Great introduction showing game development with Silverlight

Step-by-Step Tutorial

Step 1: Configure SharePoint _LAYOUTS Directory

Create two folders under the SharePoint _LAYOUTS directory:

C:\Program Files\Common Files\Microsoft Shared\
  web server extensions\12\TEMPLATE\LAYOUTS\
    ├── ClientBin\      ← Silverlight client DLLs
    └── Silverlight\    ← XAML pages

ClientBin folder: Contains all Silverlight client-side assemblies required by your application (automatically generated when compiling Silverlight projects)

Silverlight folder: Stores XAML page files for the Silverlight UI

Step 2: Configure ClientBin Folder Permissions

In IIS Manager, configure the ClientBin folder:

Directory Security:

  • • Set Read access only
  • • Set Execute permissions to None

MIME Types: Add the following to allow Silverlight assemblies to be downloaded:

.dll  →  application/octet-stream
.pdb  →  application/octet-stream  (for debugging)

Step 3: Configure Silverlight Folder for XAML

Configure the Silverlight folder to support XAML files:

.xaml  →  application/xaml+xml

This MIME type tells browsers to handle XAML files correctly for Silverlight rendering.

Step 4: Create Silverlight 1.1 Project in VS2008

In Visual Studio 2008:

  1. 1. File → New → Project
  2. 2. Select Silverlight Project template (added by Silverlight 1.1 Tools)
  3. 3. Create your Silverlight application with XAML UI and C# code-behind
  4. 4. Build the project - ClientBin folder is automatically populated

Step 5: Create SharePoint Web Part Host

Create a custom Web Part that embeds the Silverlight application. This keeps all Silverlight-specific code outside of SharePoint's core files:

public class SilverlightWebPart : WebPart
{
    protected override void RenderContents(HtmlTextWriter writer)
    {
        // Render Silverlight object tag
        writer.Write("<div id='silverlightHost'>");
        writer.Write("<object ... >");
        writer.Write("<param name='source' ");
        writer.Write("value='/_layouts/Silverlight/App.xaml'/>");
        writer.Write("</object>");
        writer.Write("</div>");
    }
}

Step 6: Deploy Files

Copy compiled output to SharePoint:

  • • Copy XAML files → _LAYOUTS/Silverlight/
  • • Copy DLLs from ClientBin → _LAYOUTS/ClientBin/
  • • Deploy Web Part to SharePoint GAC or bin directory
  • • Add Web Part to SharePoint page

Advantages of This Approach

  • Clean separation: Silverlight development happens independently of SharePoint
  • Easier debugging: Develop and test Silverlight apps outside SharePoint environment
  • Standard deployment: Uses _LAYOUTS directory following SharePoint best practices
  • Minimal SharePoint changes: Only adds folders and MIME types, no core modifications
  • Reusable Web Part: Host different Silverlight apps by changing source parameter

Modern Context: Silverlight's Legacy

Silverlight 1.1 (and all Silverlight versions) have been discontinued:

2008-2012 - Silverlight Peak:
Silverlight competed with Flash for rich internet applications, offering C# development and .NET integration
2012 - Microsoft Announcement:
Silverlight would no longer be actively developed; HTML5 became the strategic direction
2021 - End of Support:
Microsoft ended all Silverlight support on October 12, 2021
Modern Alternatives:
• SharePoint Framework (SPFx): TypeScript/React web parts
• Blazor WebAssembly: C# in the browser without plugins
• React/Angular/Vue: Standard JavaScript frameworks
• HTML5 Canvas/WebGL: Rich graphics without browser plugins

Lessons That Still Apply

While Silverlight is gone, the architectural patterns remain valuable:

  • • Separation of concerns: Develop rich UI independently of backend platform
  • • Web Part hosting pattern: Still used in modern SPFx development
  • • _LAYOUTS directory usage: Standard SharePoint deployment location
  • • MIME type configuration: Important for serving any static assets
  • • Virtual PC development: Now replaced by Docker/WSL but same principle

Key Takeaways

1. Silverlight enabled rich .NET experiences in browsers - pioneered RIA development
2. Web Part hosting pattern is timeless - still used in modern SharePoint
3. Separation of development environments - clean approach that survived the technology
4. Technology shifts happen - HTML5 won over plugin-based solutions
5. Migration path exists - Blazor WebAssembly offers similar C# browser experience

Related reading

More in the Digest — a weekly roundup of AI and agents news — or start with AI Strategy.