I am having a small problem with my MVC 3 application. The server has GZIP compression functionality and it works great. However, from to time, we place folder with static html pages in the root of our application: /somefolder/index.html and for some reason when I navigate to this URL first time (uncompressed) it shows the page fine, but next time it comes up with an error in the browser saying “Content Encoding Error” like here:
Does anyone know how to fix this? Do I need to exclude html files from compression? This folder is out of MVC3 framework, so maybe adding a route to it, or ignoring this path will fix it? Please advise, Thanks.
If someone ever encounter this:
The problem was that I had a cassette project along with GZIP functionality of the server. The minifying library was throwing an error and browser didn’t know what do to with it, so it bummed out. The fix is to add this line
settings.IsHtmlRewritingEnabled = false;to cassette configuration file’sConfigure()method.