Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MIME type for WP8 AET

I am looking for the Mime type for an aetx file.

This file is used when distributing a windows phone 8 application in house. a user downloads and installs this to their phone. But, when you download this file the phone does not give the option to install this enrollment token. I can only guess the web server is not set to the correct MIME type so the phone is responding appropriately.

my google skills have failed me on the occasion and the microsoft documentation is... sparse on this subject.

thanks for any help.

Martyn

like image 649
SmithMart Avatar asked Jan 09 '13 15:01

SmithMart


2 Answers

Finally found it. in the aet.xml file that's created when you generate one of these tokens you can see its an x509 certificate file.

So, the mime type is:

"application/c-x509-ca-cert"

So you can host this on a secure site and then set the mime type for your users to download, hopefully it saves someone else some time.

like image 174
SmithMart Avatar answered Nov 02 '22 06:11

SmithMart


While Martin's answer is correct for Windows Phone 8.0, it won't work for Windows Phone 8.1.

If you use "application/c-x509-ca-cert" with 8.1, the .aetx file is transformed to .cer and you get the error 0x8028a001 "Your phone couldn't add one or more certificates because the certificate file might be unsupported or corrupt ...".

The correct type for 8.1 is "application/octet-stream". Same mime-type used when you send the token as attachment in an email.

But with "application/octet-stream", WindowPhone 8.0 doesn't see the aetx file as token and displays its content to the user.

The solution is to use a servlet (or equivalent if you're not using java) to set the mime type dynamically.

like image 21
Mohamed AMAZIRH Avatar answered Nov 02 '22 06:11

Mohamed AMAZIRH