Allow IIS to download apk from Website

Problem

Many of the times we add APK file in the website for users to download, IIS by default allows only browser compatible file, so simply adding a link to apk will not allow the users to download it.

Solution

Step 1

  1. Open the Internet Information Service (IIS) Manager -> Properties
  2. Click MIME types
  3. New -> type Extension “.apk” and MIME type “application/vnd.android.package-archive”
  4. Click Ok and Apply

Step 2

Add following line of code to your web.config

<system.webServer>
<staticContent>
<mimeMap fileExtension=”apk” mimeType=”application/vnd.android.package-archive” />
</staticContent>
<system.webServer>

Leave your comment