My First Silverlight 2.0 Application Deployment Rodeo

This post describes the issues I encountered moving my Silverlight 2.0 Application from development to a hosted server environment.  The app is running great and deployment really wasn’t too bad, considering I had never installed a Silverlight application before.

The first experience I had with my new, cool Silverlight 2.0 Application was staring at a blank screen.  I installed the .NET 3.5 Framework SP1 last week, but was wondering if there was anything else I needed to do on the server.  It seemed a tweak to IIS 6 was required, adding Silverlight MIME types to the web site as illustrated below.  I added the 3 MIME types listed on this post from Jacqualine Chow and afterward my Data Grid was displaying in all of its CLR-coded client-side glory.

 

Okay, now that my control was displaying I needed to find out why my web services were dead. Thankfully, Fiddler 2.0 was there to come to my rescue with the information I needed on what was happening with my Web Services.  Below is a Fiddler inspector view from later in the game telling me that my test Community Server environment wasn’t completely setup, as one of the Data Providers used in my Silverlight app was not loading.

 

The most probable Web Services error you’ll initially encounter is a “Server did not recognize the value of HTTP Header SOAPAction.”  This error indicates that the Web Services URL in our Silverlight class library project is incorrect. 

I first approached this error by updating the endpoint address in the Silverlight project’s ServiceReferences.ClientConfig file, then re-compiling and updating the XAP.  That didn’t seem to be sufficient, as I had to do a Search-Replace on all Web Service URLs in my Silverlight class project as well.  I need to learn more about Web Service configuration in Silverlight 2.0 (as well as move from ASMX to WCF), but this is what worked for me at my first Silverlight Rodeo.

Here are the takeaways, Buckaroos: 1) Add MIME types, 2) Get Fiddler 2.0, 3) Update all appearances of the Web Services Url with the new site Url in the Silverlight class library project.

Article written by

A long time developer, I was an early adopter of Linux in the mid-90's for a few years until I entered corporate environments and worked with Microsoft technologies like ASP, then .NET. In 2008 I released Sueetie, an Online Community Platform built in .NET. In late 2012 I returned to my Linux roots and locked in on Java development. Much of my work is available on GitHub.