解決IIS6.0無法下載Office 2007檔案格式(ex:docx)的問題

最近在寫有關檔案上下載的程式....

發現將Office 2007檔案格式(例如docx檔)的檔案上傳到server端是ok的...

但從client端要下載回來,卻發生了錯誤的現象....

最後到網路找了一下資料.才知道在IIS6.0要下載office 2007格式的檔案

要先到IIS管理員→網站→右鍵[內容]→HTTP標頭→MIME類型→新增→

副檔名:.docx
MIME類型:application/vnd.openxmlformats-officedocument.wordprocessingml.document

這樣就可以下載.docx檔了...

更多Office2007文件的MIME格式如下:

.docm,application/vnd.ms-word.document.macroEnabled.12
.docx,application/vnd.openxmlformats-officedocument.wordprocessingml.document
.dotm,application/vnd.ms-word.template.macroEnabled.12
.dotx,application/vnd.openxmlformats-officedocument.wordprocessingml.template
.potm,application/vnd.ms-powerpoint.template.macroEnabled.12
.potx,application/vnd.openxmlformats-officedocument.presentationml.template
.ppam,application/vnd.ms-powerpoint.addin.macroEnabled.12
.ppsm,application/vnd.ms-powerpoint.slideshow.macroEnabled.12
.ppsx,application/vnd.openxmlformats-officedocument.presentationml.slideshow
.pptm,application/vnd.ms-powerpoint.presentation.macroEnabled.12
.pptx,application/vnd.openxmlformats-officedocument.presentationml.presentation
.xlam,application/vnd.ms-excel.addin.macroEnabled.12
.xlsb,application/vnd.ms-excel.sheet.binary.macroEnabled.12
.xlsm,application/vnd.ms-excel.sheet.macroEnabled.12
.xlsx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xltm,application/vnd.ms-excel.template.macroEnabled.12
.xltx,application/vnd.openxmlformats-officedocument.spreadsheetml.template

解決IIS6.0無法下載Office 2007檔案格式(ex:docx)的問題

你可能感兴趣的:(Office)