解决IIS6.0无法下载Office 2007文件格式(ex:docx)的问题

解决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



参考网址:http://www.izonedesign.co.uk/blog/web-design/download-office-2007-file-extensionsmime-types-with-iis-60/

原文:大专栏  解决IIS6.0无法下载Office 2007文件格式(ex:docx)的问题


猜你喜欢

转载自www.cnblogs.com/chinatrump/p/11496803.html