How can I get my XBAP to run in my browser instead of downloading it on Windows 7?
Asked Answered
E

2

7

On my old XP computer, running an XBAP from Visual Studio would open it up in Google Chrome. I switched to Windows 7, and now running an XBAP downloads the file like it were a ZIP or an EXE instead of opening it in the browser. The same thing happens in FireFox.

Does anyone know why I am suddenly downloading the file instead of opening it? And how I can fix it?

And yes, I know XBAPs are not meant to run on Chrome, but if you copy a bunch of FireFox dlls to the Google\Chrome\Application directory it runs just fine (steps here if anyone wants).

Even before I had that setup, it would still try and open an xbap in chrome and I could copy the URL to IE for testing. Now it downloads the file so I can't even do that.

Edgardoedge answered 7/9, 2011 at 16:15 Comment(2)
Have you looked at #75486?Space
@Space Yes I did. My issue isn't running XBAPs on Chrome, it's the fact it's downloading the xbap instead of trying to run it.Edgardoedge
E
4

Got it... Firefox (and Chrome, since I'm using FF dlls to run XBAPs in Chrome) 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

To fix this, I needed 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 FireFox folder doesn't exist, create it)

Also in case you're looking to do the same, I think this was the link I used to figure out what FF files I needed to copy to Chrome's installation directory:

The following libraries found in Mozilla Firefox instalation directory C:\Program Files\Mozilla Firefox have to be coppied to Chrome installation directory:

  • js3250.dll
  • mozcrt19.dll
  • nspr4.dll
  • nss3.dll
  • nssutil3.dll
  • plc4.dll
  • plds4.dll
  • smime3.dll
  • sqlite3.dll
  • ssl3.dll
  • xpcom.dll
  • xul.dll

Assumming Chrome is installed in the following directory, USER corresponds to your windows user. C:\Users\[USER]\AppData\Local\Google\Chrome\Application

Edgardoedge answered 7/9, 2011 at 16:50 Comment(3)
@RashminJaviya The cause of the problem and method for the solution should be the same, so a little Googling should find you the equivalent file in .Net 4.0Edgardoedge
actually i tried a lot, but my chrome 36.0.1985.125 download xbap file instead of showing on page :(Bolt
@RashminJaviya I've added an update to my answer to clarify what the steps are to get this working. If you still need help, please post a new question with the relevant details of what you're trying to do, what's actually happening, and exactly what steps you've tried already.Edgardoedge
S
-1
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

Maybe it is related with the file extentsions?

Skeleton answered 7/9, 2011 at 16:22 Comment(1)
The MIME type in IIS is for running .xbap applications on your web server. It doesn't affect running them locally in a browser (but just in case, yes my IIS MIME types are setup)Edgardoedge

© 2022 - 2024 — McMap. All rights reserved.