Thursday, February 5, 2009

I have been developing a Silverlight application, and i deployed it to a demo server. When i went to test it, the demo gods immediately kicked into gear and i received a script error message instead of seeing my control:

Error: Sys.InvalidOperationException: InitializeError error #2104 in control '[insert my control id here]': Could not download the Silverlight application. Check web server settings

So of course i googled the error message. It turns out this one is very easy to solve, but there is a bit of random rubbish and partial answers floating around out there. It turns out that IIS would not serve the control to the browser because i had not set up the correct MIME types in IIS, so IIS had no idea what the browser was requesting.

The best solution i found was this blog post: http://web.iotap.com/Blogs/tabid/277/EntryId/65/Configuring-Silverlight-2-0-Application-in-IIS.aspx

You need to ensure that the website hosting the Silverlight control has the following MIME types registered:


ExtensionMIME type
.applicationapplication/x-ms-application
.deployapplication/octet-stream
.manifestapplication/manifest
.xamlapplication/xaml+xml
.xapapplication/x-silverlight-app
.xbapapplication/x-ms-xbap
.xpsapplication/vnd.ms-xpsdocument






Realistically you probably only need the xaml and xap entries, but i entered them all and the demo gods smiled once again. Once you have done that, Ctrl-F5 your web page (or just F5 for some other browsers), and you should see your Silverlight control appear.

As per that blog article, i also enabled the content expiration, but i'm not sure of the relevance of that in this particular case (maybe it stops the Silverlight control from being cached?).




keywords: silverlight 2, deploy, error 2104, silverlight mime types

Wednesday, September 10, 2008

Chrome and its processes

Wow, i gotta say "Thanks" to Scott Hanselman (who i must say is an excellent technical speaker, i met him briefly at TechEd NZ, not that he would remember me). Almost exactly a week ago i questioned all the processes being started by Google Chrome (here), and in an excellent post he has answered that exact question. You can find his post here. 

The problem with his answer is that it produces a lot more work for me - now that i know a little bit i have to go and research and become familiar with that design pattern. The possibilities could be interesting, maybe this would be a cool way to allow third parties to integrate into your application and give them a very limited access to your data or authentication services (i'm presuming that Chrome and IE8 totally isolate their addons).




Keywords: google, chrome, IE8, processes