views:

188

answers:

1

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
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
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
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