3

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

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Stuart
  • 31
  • 2

2 Answers2

0

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
  • 20,629
  • 2
  • 66
  • 86
  • 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 Nov 18 '09 at 18:40
  • 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 Nov 18 '09 at 20:31
  • 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 Nov 20 '09 at 16:23
0

Firefox runs XBAPs by using a dll from the .Net 3.5 Installer, and since Windows 7 comes with 3.5 already installed, this dll isn't available

Solution is to copy the file C:\WINDOWS\Microsoft.NET\Framework\v3.5\Windows Presentation Foundation\NPWPF.dll from an XP machine to C:\Program Files (x86)\Mozilla Firefox\plugins (if the plugin folder doesn't exist, create it)

Rachel
  • 130,264
  • 66
  • 304
  • 490