Hi, I have built an application for my college work in WPF browser, but when I try to debug, Firefox opens and gives me a download of the xbap file, which should run in the browser. This happens in VS2008 Express and VS2010 beta. I have tried in Internet Explorer and Chrome with the same result. .NET is framework is installed right upto v4.0. This didnt happen before I started using Windows 7, but this shouldn't make much difference, right? Any ideas? Thanks
A:
Check your MIME type settings in IIS. In earlier versions of Windows this was somewhat obscure to find in the UI, but in 7 it's easy: Start -> search for IIS -> choose IIS Manager -> filter for MIME.
You need to have the following types configured:
MIME Type Extension
application/manifest .manifest
application/x-ms-xbap .xbap
application/octet-stream .deploy
application/x-ms-application .application
application/vnd.ms-xpsdocument .xps
application/xaml+xml .xaml
(taken from here: http://www.xbap.org/faq.html )
Richard Berg
2009-11-18 18:21:52
Well it turns out IIS manager wasn't even enabled in control panel. I have enabled and added those extensions but the problem is still present.
Stuart
2009-11-18 18:40:10
Then you are probably using Cassini (aka "Visual Studio Web Development Server"). I wouldn't recommend this for a variety of reasons. Among them, there doesn't appear to be a way to configure its MIME types. You'll have to configure HttpHandlers directly from web.config: http://msdn.microsoft.com/en-us/library/ms972953.aspx
Richard Berg
2009-11-18 20:31:25
Actually, I don't think this is the problem as it isn't only visual studio which is affected. The demo on http://www.xbap.org/faq.html also does the same.
Stuart
2009-11-20 16:23:44