Many of you have probably been developing AIR (formerly Apollo) applications since the initial public release. You probably set the proper MIME Type on your server to handle the ".air" files. However, the MIME Type is different than it was when AIR was first released. You might want to take a minute to ensure that you have the correct MIME Type on your server. Here is the correct MIME Type:
application/vnd.adobe.air-application-installer-package+zip
If you haven't added the MIME Type on your server, you will need to add it so that ".air" files can be served properly from your web server. The instructions below should help you add it.
Apache
In Apache, you will need to edit your httpd.conf file. There will be many "AddType" declarations in the file. You simply need to add the following line to that list of declarations:
Code Example 1 - Adding AIR MIME Type to Apache
Lighttpd
In Lighttpd you will need to edit your lighttpd.conf file. Just as in Apache there will be MIME Type declarations, but they will be inside of the mimetype.assign code block. Simply add your declaration to the end of this list. The example below demonstrates this.
Code Example 2 - Adding AIR MIME Type to Lighttpd
IIS
To add the MIME Type to IIS, you will need to do the following steps. All of these steps assume that you are in the properties window for one of the sites you have defined in IIS.
Thanks for sharing that, David. I just pointed to the page from a comment I’ve added in the CF9 help (because its Server Manager is an Air app that gets launched by the web server and people using that may hit this problem).
I’ll add as an update to your IIS notes that if one is using IIS 7 (as found in Vista/Server 2008), they would instead first select the server or web site, then choose “mimetypes” in the features view on the right, then choose “add” in the actions pane to the right of that.
David, thank you for this post. I have walked 20 miles across the Internet looking for a solution and this hit the spot. The site I was working on happened to be running on IIS 6+ and your thoughtful last entry made my day.
I have added the MIME type
application/vnd.adobe.air-application-installer-package+zip extension .air
but when trying to download the application it still does the same thing. I have stopped IIS and restarted it again but still no luck.
Please assist.
Excellent post – still useful 2 years after it was written.
I also wanted to point out that using Apache if you do not have access to the httpd.conf file (for example in a hosted environment) you can always add the AddType line to a .htaccess file in either your web root directory or the directory housing the download script.