0

We have created an Azure web app. We want to use this app to enable our site visitors to download appxbundle of our UWP app. We are able to put the files on the folder and can see them through FTP. However as soon we try to access the files by just typing the resource URI in the browser it throws an error at us stating:

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

I tried putting the file in the root directory as well but the error remained the same. From this blog we know that it can be done but somehow we are not able to make it work. Any idea how can we make it happen?

Rajesh Pandya
  • 1,540
  • 4
  • 18
  • 31

2 Answers2

2

Turns out that MIME types need to be explicitly copied into the web.config file. You can check for these in the Visual studio as well but if you want to configure it manually then make sure you add the following lines to your web.config

<system.webServer>
      <staticContent>

     <mimeMap fileExtension=".appinstaller" mimeType="application/xml" />    
     <mimeMap fileExtension=".appxbundle" mimeType="application/vns.ms-appx" /> 
     <mimeMap fileExtension=".appx" mimeType="application/vns.ms-appx" /> 

      </staticContent>
   </system.webServer>

Adding this snippet got us through the access error mentioned above.

1

Yeah, that's a regular case of MIME types.

Add the following to the section of your Web.config:

<staticContent>
  <mimeMap fileExtension=".appxbundle" mimeType="application/xml" /> 
</staticContent>

Alternatively, try it with mimeType="application/octet-stream", depending on whether you want it to be downloaded or "inlined" (which for .appxbundle, i don't know what it means, maybe kick off install/open Windows Store?)

More on mimeMap here.

evilSnobu
  • 24,582
  • 8
  • 41
  • 71