简体   繁体   中英

want original static files to get downloaded from server

I have enabled gzip compression in IIS. While downloading .xlsx files from server in IE browser, the files are getting compressed. When I am disabling static content compression in IIS, I am not getting original size of the files.

Is there any setting on IIS7/root config level, where I can make changes to get .xlsx files in its original form, without affecting any other components.

By default i don't think IIS enables compression for ms-office documents. But it could be a case in your server if it's configured like that.

Is there any setting on IIS7/root config level, where I can make changes to get .xlsx files in its original form, without affecting any other components

I assume your question is to get excel files without compression?

Yes IIS has a ApplicationHost.Config that you can use. This is at the root level( Be doubly sure before doing this might affect other hosted apps ). In this, Navigate to element staticTypes under httpCompression element. If the following are enabled , disable them by making them to false . It will disable ' *.xlsx ',' *.xls ' respectively.

<add mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" enabled="false"/>
<add mimeType="application/vnd.ms-excel" enabled="false"/>

Help urls

configuring static types - http://www.iis.net/configreference/system.webserver/httpcompression/statictypes

mime-mapping - http://www.rackspace.com/knowledge_center/article/how-can-i-define-mime-types-on-my-windowsiis-based-site

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM