IIS7: Force download of CSV File

Published by

Posted on December 19, 2011

If you require the need to force download a CSV file. These are the steps we took to accomplish said task.

Remove the existing mime type.
Add a Content-Type to the http response header as

Name: Content-Type
Value: application/csv

This was required because the browser kept parsing the csv file as text. We needed the file to be force downloaded to the users PC.