We have a ASHX response handler that dynamically generates .VCF files on the fly and delivers them as ContactLisa.vcf. Internet Explorer and FireFox recognize the results properly (views the mimetype as text/vCard and saves the file as ContactLisa.vcf). However both Opera and Safari view the response as "GenerateVCard.ashx" and saved it as such...and ignores the mimeType.
The content of the saved file is the vCard data so the script is running properly.
How can we get Opera and Safari to properly recognize the vCard mimetype and save the results as a .VCF file?
Here is the part of the code where we set the mimetype and appropriate headers:
context.Response.BufferOutput = true;
context.Response.ContentType = "text/x-vcard";
context.Response.AddHeader("content-disposition", "attachment; filename=ContactLisa.vcf");