Last night I wanted to try working with the new Silverlight 2 control. Sounds reasonable, isn't it? I created a new Web Site based on IIS, then I created a separate Silverlight application with some simple content. I inserted the SL control on a page and set the Source property to the resultign XAP file (which was conveniently copied to my web site).
However, this didn't work - the SL content was not shown, although the generated HTML looked ok. First I thought (as this is almost always true in this situations) security; permissions and all that stuff. I tried everything I could think of, even allowing everyone full control - please just work! Nothing.
Then I tried a different approach. I created a new SL project and let the wizard create for me a web site and embedded the SL control in there, and it worked! So, my SL installation is definitely ok. The difference was this site was run by the VS Web Site Development Server (not the real IIS). It must be this difference.
Eventually, I figured it out. The XAP extension was not defined as a MIME type (the SDK installation didn't do that) and IIS 7 on my Vista machine simply treated the file as hostile. I manually added the extension as a MIME type, and presto - it works!
Maybe this could spare someone the 2 hours i spent on this...