I got some questions about why is Silverlight 2 beta not working on my production Web server? Well, one of the most errors I found is the missing MIME type definition in IIS. Silverlight 2 doesn't compile a DLL as the beta 1.1 did. The new file extension is .XAP. The only thing you have to do is following step:
- Open the Internet Information Services Manager (IIS Manager)
- Right-click on IIS and select Properties
- Click on the MIME-Types button
- Click on New... to add a new MIME-Type
- For file extension use .XAP and for the MIME-Type use
(don't miss the dot before XAP!!)
Now you are able to run your Silverlight 2 apps.
If you cannot modify the MIME type you can simple rename the ClientBin file to .DLL. Note that you have to modify the source param, too.
Update: If you are using IIS7 yu can run following command. This will change the applicationHost.config in the subfolder config (section <staticContent/>):
"%systemroot%\System32\inetsrv\appcmd" set config /section:staticContent /+[fileExtension='.xap',mimeType='application/x-silverlight']