views:

475

answers:

2

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.

+1  A: 

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.
Brian Genisio
Like I said, I have deployed this to a brand new Windows 2008 Server, so it has IIS 7 with the defaults, which has the MIME types setup. I have verified this manually as well. I have not checked if the Silverlight plug-in can be debugged because I'm having issues on a server, not on the development machine.
YeahStu
I am pretty sure that the XAP mime type is NOT there by default on a clean install of IIS 7.
Brian Genisio
I can assure you that it absolutely is. It was there and I didn't add it.
YeahStu
OK, cool... so 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.
Brian Genisio
if you edit this and put these suggestions in the answer, I'll accept your answer. I wasn't getting the XAP file getting sent via the server. Your hints helped me figure it out.
YeahStu
Done. Thanks :) Glad it helped.
Brian Genisio
A: 

The issue was caused by the fact that I was deploying the site to an "Application Directory" under the default web site on Windows Server 2008. Therefore, the relative link to the .XAP file was not resolving correctly. I fixed the issue by deploying the web site to the root of the default web site, which works fine for me.

Going through Brian's suggestions were very helpful in resolving this: 1. Can you right-click on the "block of whitespace" and get the Silverlight menu? In my case, I could. 2. Is the XAP file getting to the client? You can check the Temporary Internet Files from a client machine to see if it is getting downloaded. Mine was not at this point.

YeahStu