29

I would like to know how to configure IIS 7.0 to allow the download of APK files?

I found an article which tells me to add a new MIME type:

File Name Extension: .apk

MIME Type: application/vnd.android.package-archive

Because In IIS there needs to be a MIME type added to allow IIS to support the .APK file type.

Is this all that is needed?

Thanks for any replies

22

Generally, adding a new MIME type should be all that's required:

application/vnd.android.package-archive
  • 3
    Generally, true. Annoyingly, type wasn't included in your "answer". – Adam Plocher Oct 20 '15 at 21:40
  • how is this the accepted answer? – Jeff Woodard May 8 '17 at 18:24
45
  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
  • 2
    andrOId, not andrIOd – Pierre Feb 28 '15 at 18:06
  • Pierre, Thx correct me and updated – TimLau Apr 1 '15 at 7:36
9

Add this to the web.config:

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

Using the method above doesn't require the MIME type to be set in IIS, just add the static content in your web.config file, as mentioned by Igor

  • <div> <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/android-debug-unaligned.apk">Download</asp:HyperLink> </div> – Ridwaan Maharaj Jan 19 '17 at 17:50
  • web.config = <staticContent> <mimeMap fileExtension="apk" mimeType="application/vnd.android.package-archive" /> </staticContent> </system.webServer> – Ridwaan Maharaj Jan 19 '17 at 17:51
0

a better option is to use the MIME of a Zip file, since an apk is actually a zip file and is IIS knows it.

for me worked just fine with a server with Windows 10 Anniversary.

  • Is there some config (or pointers) you could share? – iwaseatenbyagrue Mar 4 '17 at 12:43
0

Extension : .apk

Type MIME : application/octet-stream

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.