我正在尝试设置一个页面来安装appx应用程序,如这个博客所示:https://blogs.msdn.microsoft.com/appinstaller/2017/09/26/uwp-app-installs-from-web-via-app-installer/
我已经生成了我的应用程序包文件,在IIS上创建了一个带有链接的基本index.html站点。
<a href="ms-appinstaller:?source=http://localhost:89/MySampleApp_0.0.1.0_x86.appx">Install appx package</a><br>当我通过资源管理器运行appx文件时,它会安装得很好。当我从上面的链接打开它时,它会启动应用程序安装程序,但是有错误:
无法打开appx/appxbundle/appinstaller文件。原因:解析appx/appxbundle/appinstaller时出错
我对IIS不太了解,但我认为这与访问安装文件有关。如果我移除
ms-appinstaller:?source=部分文件下载确定,因为我设置了mimetype。
有什么想法吗?
编辑:我使用的是自签名证书。这就是问题所在吗?
发布于 2018-06-14 15:26:56
刘风在评论中给出了答案。如本文所述,设置回环豁免解决了以下问题:
发布于 2021-04-21 21:14:35
这是一篇关于它的文章
https://learn.microsoft.com/en-us/windows/msix/app-installer/web-install-azure
总之,有三件事要检查。
首先,确保将应用程序包文件上传到指定的位置(下面高亮显示的安装程序位置)。

其次,如果您使用自己的证书,则安装应用程序包所用的证书。
最后,确保为应用程序包MIME类型配置web应用程序。在web.config文件中,添加以下行:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<!--This is to allow the web server to serve resources with the appropriate file extension-->
<staticContent>
<mimeMap fileExtension=".appx" mimeType="application/appx" />
<mimeMap fileExtension=".msix" mimeType="application/msix" />
<mimeMap fileExtension=".appxbundle" mimeType="application/appxbundle" />
<mimeMap fileExtension=".msixbundle" mimeType="application/msixbundle" />
<mimeMap fileExtension=".appinstaller" mimeType="application/appinstaller" />
</staticContent>
</system.webServer>
</configuration>https://stackoverflow.com/questions/50004478
复制相似问题