Be careful with IIS Dynamic Compression and SharePoint

Had an issue this week that was resulting in blank  pages being rendered for users of our SharePoint Extranet. The issue surfaced itself in two different ways. Users were able to access the sign in page but once they completed the sign in using Live Authentication (we’re using LiveAuth via Claims FBA for our extranet) they immediately received the error.

The Symptoms

Using Internet Explorer

Users received a generic “Page could not be displayed error message.”

Using Google Chrome

Users received the following error message.

Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error

The Problem

I checked the IIS logs, no problem. Captured the requests using Internet Explorer (F12) and all of the response codes looked good but the actual response returned was empty. The error message from Google Chrome helped shine some additional light on the issue and we were determined it had to be a modification to the HttpResponse somewhere. We have some custom code in other areas of our SharePoint environment that modify the HttpResponse to perform things like stripping unnecessary resources and custom 404 handlers but none of those applied in this scenario.

Of course, problems usually don’t create themselves and sure enough recently we had made some modifications to IIS to increase how aggressive we were with caching on our web front ends. The culprit? We had turned on Dynamic Compression and cranked that baby up to 9 (max). This setting seems to work fine with Windows Authentication and Windows via Claims but failed for our users that were using Live Authentication through Claims authentication. Specifically it seemed to fail on the internal redirect from /_trust/default.aspx to the homepage for the SharePoint site.

Note: Users could still access some system pages (ex: /_layouts/viewlsts.aspx), images and documents directly.

The Solution

The following steps have resolved our issues.

  1. Set dynamic caching back to 0
    cd \windows\system32\inetsrv
    appcmd set config -section:httpCompression -[name=’gzip’].dynamicCompressionLevel:0
  2. Turn off dynamic caching
    cd \windows\system32\inetsrv
    appcmd set config /section:urlCompression /doDynamicCompression:False
  3. Perform an iisreset

 

I'm a public speaker and the Chief SharePoint Architect for Eastridge, a Microsoft Gold Partner specializing in SharePoint and custom application development in Winston-Salem, NC. I focus on the SharePoint platform with a specialty in Information Architecture, Publishing and Best Practices.

Got something to say? Go for it!