thecfguy

A Unique Developer

404 Page not found displayed when try to download .xlsx extention

Today I face really strange issue, when I tried to download file with extention .xlsx and browser redirect me on 404 Page not found page. My belief is whenever IIS (webserver) found file is not script file then it will let browser to download the file but in this case it took me to "Page Not Found" page.

I have done googling for this and Solution is really simple. We require to add Mime type 'application/octet-stream' in IIS.

How to Add Mime Type in IIS 6.0.

  1. Open Internet Information Services from Control panel >> Administrative Tools.
  2. Right click on website and select "Properties"
  3. Go to HTTP Headers tab.
  4. Click on "File Types" button in MIME Map Group.
  5. Add new type and add extention and MIME type.