Oct 22 2021 03:01 AM - edited Nov 10 2021 02:26 AM
I integrated MSIX into a WinForms project and configured it as a package bundle and deployed to an Azure App Service.
Everything works fine and I can install the app. But when I deploy a new version it fails to auto update and when I try to install the application again it fails with "Error parsing app package" error.
If I sign out or restart my PC, it works. I'm not sure what to do to solve this, because the installer works. How can I solve this?
It looks like a caching issue or something similar, as described here. The Delivery Optimization Service doesn't download the entire App Installer file and because of this it fails to parse it.
https://stackoverflow.com/questions/64381453/appinstaller-xml-issue/68976913#68976913
I even tried the suggested workaround - to pad the contents of the App Installer file. But still doesn't work.
Not sure what else can I do here.
This is my App Installer file. I removed sensitive information so the urls will not work.
```
<?xml version="1.0" encoding="utf-8"?>
<AppInstaller
Uri="https://d1-myapp-setup-wba.azurewebsites.net/POS.Installer.appinstaller"
Version="1.0.0.46" xmlns="http://schemas.microsoft.com/appx/appinstaller/2017/2">
<MainBundle
Name="954a406f-c23f-4089-9b7f-b2241bfb3245"
Version="1.0.0.46"
Publisher="CN=MyCompany"
Uri="https://d1-myapp-setup-wba.azurewebsites.net/POS.Installer_1.0.0.46_Test/POS.Installer_1.0.0.46_AnyC..." />
<UpdateSettings>
<OnLaunch
HoursBetweenUpdateChecks="0" />
</UpdateSettings>
</AppInstaller>
```
This is my web.config in the Azure App Service:
```
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".msix" mimeType="application/msix" />
<mimeMap fileExtension=".msixbundle" mimeType="application/msixbundle" />
<mimeMap fileExtension=".appx" mimeType="application/vns.ms-appx" />
<mimeMap fileExtension=".appxbundle" mimeType="application/vns.ms-appx" />
<mimeMap fileExtension=".appinstaller" mimeType="application/xml" />
</staticContent>
<httpProtocol>
<customHeaders>
<add name="Pragma" value="no-cache" />
<add name="Cache-Control" value="max-age=0, no-cache, no-store, must-revalidate" />
<add name="Expires" value="Sat, 01 Jan 2000 00:00:00 GMT"/>
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
```
Oct 22 2021 04:52 AM
SolutionOct 22 2021 05:07 AM
Oct 22 2021 05:11 AM
Oct 22 2021 04:52 AM
Solution