Subscribe | Alerts via Email
View All Quotes
“Nearly all men can stand adversity, but if you want to test a man's character, give him power.”
-Abraham Lincoln
<July 2010>
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

©2010 Cal Zant
Sign In
Total Posts: 106
This Year: 5
This Month: 1
This Week: 0
Comments: 2

I recently ran into an interesting issue where I had a .xls file linked in one of my web pages, and changed the content to a .xlsx file ... updated the link and it quit working.  Every time I clicked on it, I was sent to a 404 error ("Page Cannot Be Found").  I double checked the path in the link, that the file actually existed, that it had the correct permissions, etc. and everything seemed correct.

Turns out you have to manually add the MIME Types for the new Office 2007 file extensions (e.g. docx, xlsx) in order for IIS 6 to render them.  I checked IIS 7 and it apparently doesn't have this same problem.  Here is how you add the new types:

  1. Go into IIS Manager, right-click on the Web Sites folder, and select Properties
    IIS Manager Web Sites Properties
  2. Click on the HTTP Headers tab and then click on the MIME Types... button
    Click on HTTML Headers then MIME types
  3. Add each of the MIME Types contained in the table below
    Add each MIME Type

New Office 2007 MIME Types

Extension MIME Type
docx application/vnd.openxmlformats-officedocument.wordprocessingml.document
dotx application/vnd.openxmlformats-officedocument.wordprocessingml.template
xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
xltx application/vnd.openxmlformats-officedocument.spreadsheetml.template
pptx application/vnd.openxmlformats-officedocument.presentationml.presentation
potx application/vnd.openxmlformats-officedocument.presentationml.template
ppsx application/vnd.openxmlformats-officedocument.presentationml.slideshow
Friday, March 20, 2009 3:37:08 PM (Central Standard Time, UTC-06:00)  #