Page 1 of 1

Silverlight 4 - Publishing Application to Remote Server This is for applications using WCF RIA Services

#1 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,960
  • Joined: 21-March 08

Posted 11 August 2010 - 11:00 AM

This tutorial will talk about the steps needed to publish a Silverlight 4 applications that uses WCF RIA Services for communication. There were a number of issues that I ran into trying to publish, so I decided to do a tutorial to keep other’s from having to search and hunt for the fixes.

NOTE: These steps are for IIS running on Windows Server 2003 SP2. Steps may be different for other versions of IIS.

Also, the tutorial is assuming you already have a Virtual Directory created and set as an Application in IIS.


1. First, you will need to fix your web.config file as I have noted in this blog post. This is not added by default.

2. (Optional) If you are running a .Net 2.0 or .Net 3.5 website on this same server, you will need to create a new AppPool in IIS. This is required because an AppPool can only run one version of the .Net CLR. With .Net 4, Microsoft created a new CLR. Therefore, you will need an AppPool for the .Net 2.0 and .Net 3.5 websites, and an AppPool for the .Net 4 websites. NOTE: This may have changed in later versions of IIS.

3. Next, in Visual Studio 2010, you will need to set a number of the references of the .Web project to Copy to Local. I had to do it for all of the System.ServiceModel references. You may not have all of these references, and that is fine.

Posted Image

Then go to the Properties window, and set Copy Local equal to True.

Posted Image

4. Next, you need to add a new MIME type for both the .XAP extension and the .XAML extension.

Open the IIS Management console. Drill-down until you get to your domain/default website. Right-click and click Properties.

Posted Image

Next, go to the HTTP Headers tab, then click on the Mime Types… button.

Posted Image

Now add the two new mime types..

Posted Image

Now simply publish your web project to your server, and you should be ready to go.

Is This A Good Question/Topic? 1
  • +

Page 1 of 1