Thursday, August 14, 2008

Silverlight Error Code 2104 - IIS6

I built a small Silverlight 2 Beta 2 application the other day as a POC for a current project and published it to my companies IIS 6 hosted website, but the darn thing didn't work off the bat. IE 7 gave me the error Error Code 2104 - Could not download the Silverlight application. Check web server settings. To fix this problem you need to add the following 3 MIME Types to your website via IIS 6:

Extension: .xap
MIME Type: application/octet-stream

Extension: .xaml
MIME Type: application/x-silverlight-2-b2
(Note: for Silverlight 2 full release, use application/x-silverlight-2)

Extension: .xbap
MIME Type: application/x-ms-xbap

That should do the trick!

Some blogs and forums out there suggest adding .xaml application/xaml+xml but this doesn't work for silverlight 2 beta 2.

Friday, August 8, 2008

Expression Encoder 2 + Firefox 3 + Silverlight plugin version 2.0.30523.6 = PROBLEMS!


Mozilla Sets New Guinness World Record with Firefox 3 Downloads.

If you were 1 of the 8,002,530 people who downloaded Firefox 3 on its first day of release, or even perhaps someone who downloaded it a couple days later (like me), you may have noticed that it was (or is) reacting badly with your Silverlight websites.

Problem 1
The main issue you might be experiencing may be that you're still being prompted to download and install the Silverlight plugin when visiting your site, eventhough you've already installed it. This is (and was for me) a rather annoying problem. The fix is simple enough. You need to download the Silvelright 2 beta 2 SDK and then replace the silverlight.js on your hosted Silverlight website with the new silverlight.js that comes with the SDK.

NOTE: once you've installed the SDK, the silverlight.js file is located in C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Tools path.

PROBLEM 1 solved!

Check out http://www.timheuer.com/blog/archive/2008/07/02/updating-your-silverlight-javascript-detection.aspx for more discussion on the topic.

Problem 2
A rather serious issue experienced with a site I was developing was that the Silverlight videos hosted on the site would not play on Firefox3. The site uses an Expression Encoder 2 player template. The player would load on the screen and the video would start playing, however it seemed that once the video finished streaming from the server to my client in the background it would just stop playing and all hell would break loose in the form of javascript errors, even sometimes causing the browser to close completely.

I spent the better half a week trying to find a solution, but with no such luck. The client machines that were experiencing the problem were running the Silvelright 2 Beta 2 plugin version 2.0.30523.6 (which to my knowledge at the time was the latest version) but once version 2.0.30523.8 was released and I installed it on the clients it solved the problem.

Thank you Microsoft and Silverlight for fixing it!


Firefox3 by my opinion is still the best browser out there. If you don't have it yet, get it here.