3

I created a simple web app and a simple UWP app.

In the web app, I've added a link to my uwp app. But after clicking on the link, the error comes "Error in parsing the app package.".

The .appxbundle is reachable, because if I remove ms-appinstaller:?source= from url, the downloading starts. Also, I've configured web app for MIME types.

The package seems to be valid, because if I double click on downloaded file, the installation completes.

Here some code samples:

Web.config:

 <system.webServer>
        <!--This is to allow the web server to serve resources with the appx/appxbundle/appinstaller extension-->
        <staticContent>
          <mimeMap fileExtension=".appx" mimeType="application/vns.ms-appx" />
          <mimeMap fileExtension=".appxbundle" mimeType="application/vns.ms-appx" />
          <mimeMap fileExtension=".appinstaller" mimeType="application/xml" />
        </staticContent>
  </system.webServer>

HTML page:

<html>
<head>
    <meta charset="utf-8" />
    <title> Install Page </title>
</head>
<body>
    <a href="ms-appinstaller:?source=http://localhost/UwpHost/packages/UniversalApp_1.0.5.0_x86_x64_arm.appxbundle"> Install My Sample App</a>
</body>
</html>

Any idea what could be missed?

I was following steps on this link on MSDN.

  • 1
    I've fixed it. In step 8 on this link learn.microsoft.com/en-us/windows/uwp/packaging/web-install-iis. I run "CheckNetIsolation.exe LoopbackExempt -a -n=microsoft.desktopappinstaller_8wekyb3d8bbwe" in CMD. – Pavlo Stelmakh Jun 07 '18 at 09:03

1 Answers1

1

he error comes "Error in parsing the app package.".

Derive from official document.

UWP apps like App Installer are restricted to use IP loopback addresses like http://localhost/. When using local IIS Server, App Installer must be added to the loopback exempt list.

Before use ms-appinstaller:?source=, you need to add appinstaller to the loopback exempt list. Please use the following command line.

CheckNetIsolation.exe LoopbackExempt -a -n=microsoft.desktopappinstaller_8wekyb3d8bbwe

For more detail please refer Add loopback exemption for App Installer.

Nico Zhu
  • 32,367
  • 2
  • 15
  • 36