System.IO.InvalidDataException / GZip Error When Upgrading Sitecore



When upgrading a Sitecore instance where Active Commerce is already installed, you may receive this error when attempting to update:

System.IO.InvalidDataException: The magic number in GZip header is not correct. Make sure you are passing in a GZip stream.

This has been witnessed when updating from Sitecore 7.1 to 7.1 Update 2.


Cassette, a minification and bundling tool, appears to be interfering with the update.


Add the following configuration to your web.config file:

<section name="cassette" type="Cassette.CassetteConfigurationSection, Cassette" />
<cassette rewriteHtml="false" />

Remove this configuration after the Sitecore upgrade is complete.

Have more questions? Submit a request