R – Hosting Silverlight Video Player On IIS 7 Issue

asp.nethostingiissilverlight-2.0

I am trying to host an ASP.NET application that is running the Silverlight Video Player. I have recently deployed this application to a fresh Windows Server 2008 Virtual PC. I have installed the Silverlight plug-in as well as the Silverlight 2 SDK on the server (and the .NET Framework 3.5 SP1).

When I try to browse to this site, the Video Player should load and show me the video. However, the behavior I am seeing is that a "block" of whitespace is layed-out, but I do not see the Video or Player load. On a separate Vista machine, the application works when hosted in the Visual Studio IIS Server "Cassini." The application is built in .NET 3.5 SP1.

Does anyone have any ideas about why the Silverlight player is not working? The content to load is included in the project and referenced using the "~/" syntax.

Best Answer

Do you know if the Silverlight plug-in is even loading your app? (Can you put a breakpoint in App.xaml.cs:Application_Startup?)

If not, have you checked to make sure that your IIS server has the mime type for XAP files?

The minimum requirements for hosting a Silverlight app:

  1. Any Web Server
  2. Mime type for XAP files is set up.

Some things to consider when troubleshooting this problem:

  • Is the XAP file getting to the client?
  • Can you right-click on the "block of whitespace" and get the Silverlight menu?
  • Do you see the XAP file getting sent via the server? (Try fiddler or firebug to see the traffic)
  • If the Silverlight app is, indeed getting to the client, then you should try attaching a debugger. Attach your debugger to your browser, and you should be able to debug the Silverlight app to figure it out.
Related Topic