开发者

Debugging WPF browser applications gives a download file

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 inst开发者_如何转开发alled right upto v4.0. This didnt happen before I started using Windows 7, but this shouldn't make much difference, right? Any ideas? Thanks


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 )


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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜