Home > IIS

.docx not working in web page for users

14. April 2008
I ran into the problem the other day with uploading a Microsoft Office 2007 document to a web server and it not being able to serve it or allow the user to view it.  Then it hit me...IIS 6.0 probably doesn't know what the new Office 2007 file extensions are.  This is an easy problem to solve.  You just need to add the new MimeMaps to IIS 6.0.  The new maps are as follows:

.xlsx  application/vnd.openxmlformats-officedocument.spreadsheetml.sheet  
.xltx  application/vnd.openxmlformats-officedocument.spreadsheetml.template  
.potx  application/vnd.openxmlformats-officedocument.presentationml.template  
.ppsx  application/vnd.openxmlformats-officedocument.presentationml.slideshow  
.pptx  application/vnd.openxmlformats-officedocument.presentationml.presentation  
.sldx  application/vnd.openxmlformats-officedocument.presentationml.slide  
.docx  application/vnd.openxmlformats-officedocument.wordprocessingml.document  
.dotx  application/vnd.openxmlformats-officedocument.wordprocessingml.template  
.xlam  application/vnd.ms-excel.addin.macroEnabled.12  
.xlsb  application/vnd.ms-excel.sheet.binary.macroEnabled.12  


These maps came from the following MS KB article:

http://support.microsoft.com/kb/936496

To add the new Mime Maps you can do the following:

Open up IIS Manager
Right click the web server and go to Properties
Click MIME Types button
Click New
Add the extension and MIME Type and click OK

For example to add the .docx you would enter in .docx for the Extension and then add in application/vnd.openxmlformats-officedocument.wordprocessingml.document for the MIME Type.

This should take care of it. You shouldn't have to restart IIS either.  I did this on the fly.
Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

IIS ,

blog comments powered by Disqus