Configuring IIS to Run Silverlight Services

Whom this article is for: anyone who needs to deploy a Silverlight application on IIS.

The things we need to configure IIS for Silverlight are:

  1. We need to install the .NET framework compatible with Silverlight.
  2. Silverlight (the version used to develop the Silverlight application).

Once the software above has been installed we need to install or enable IIS using the following procedure.

Either we can open it by "Run" - "appwiz.cpl" - "Turn Windows features on or off - by enabling Internet Information Services & Microsoft .NET Framework 3.5.1" or we can do it from the Control Panel.


Selecting Turn Windows Features on or off


Enabling IIS and .NET Framework


Once the preceding has been done we need to add MIME types in IIS.

To open IIS

"Run" - "inetmgr"

The first time, it will ask to connect. Once you connect and select the instance on the right hand side under "Features View" there is IIS. Under IIS there is "MIME Types"; select that, like in the following image:


In MIME Types check whether we have an extension for .SVC since we are using services in our Silverlight project. If we don't have the extension then add a new extension on right hand side at the top there is an add under Action. I already added it in my IIS, that is why File Name Extension is showing as un-editable.


We must do the same for xaml, xap and xbap extensions.


Now we are configuring IIS from the command prompt.

Since we have installed Framework and Silverlight setups in my case I am using Silverlight version is installed at the following location:


Now open a command prompt with Administrative privileges. And go to the above path.


In our case we will need both V3.0 and V4.0.30319, now first we will go to version V4.0.30319 and run the following command:

aspnet_regiis /i


The command above installs ASP.NET and enables the service for IIS.

Now we will go to version V3.0 at the following path:

c:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation

And run following command:

ServiceModelReg.exe /i


It will install a few things that we require to repare our IIS to publish our SilverlightServices and run.

Now our IIS is ready to use Silverlight enable services.

Similar Articles