This is the same question as this but I’m looking for a classic ASP solution.
I have a third party control to provide secure downloads but it expects you to provide the response.contenttype value. I’m trying to have the browser prompt with the following:
Response.AddHeader ‘Content-Disposition’, ‘attachment;filename=”’ & strFileName & ””
However Safari doesn’t like any of the suggested content types (does odd things with the file name – like add ‘.exe’ to the end).
- application/x-msdownload
- application/force-download
So I’d either like to query IIS for the correct content type or find a generic content type that would let the browser figure it out in a somewhat reliable fashion.
Typically the mimemap being used by the site is stored at server level and you can get into permission issues trying to read it. It requires some nasty ADSI code.
Have you tried the standard
application/octet-streamas a mime type?