Jun172013

Resolve NetworkService Account Not GZIPing IIS Responses

After following many posts and tutorials on properly setting up IIS dynamic compression for JSON responses, I was still reaching a dead end. For whatever reason, my responses were still uncompressed. Apparently, using the NetworkService account doesn't always play nicely with static or dynamic content compression.

The NetworkService account doesn't have permission to the IIS Temporary Compressed Files folder, preventing it from writing and reading out compressed streams. The easiest way to get around this is by adding the NetworkService account to the IIS_IUSRS group (which already has permissions to the IIS temporary folder).

  1. Open the Local Users and Groups management console
    01-LocalUsersAndGroups
  2. Choose Groups from the sidebar
    02-Groups
  3. Open the IIS_IUSRS property window
    03-IIS_IUSRS
  4. Click Add, then enter Network Service as the user. Be sure to have your local workstation as the location, then check Check Names to be sure you entered everything correctly. Click OK.
    04-NetworkService
  5. Click OK on the IIS_IUSRS property window.
    05-UserAdded
  6. Close the Local Users and Groups management console
  7. Restart IIS
  8. Dynamic compression should be working.