www.jayntguru.com

September 2, 2009

script: iis7 making compression work

Filed under: computer geek stuff — jayntguru @ 3:43 pm

This was harder than it should have been, the permissions were wrong on the inetpub\temp\IIS Temporary Compressed Files folder and it made things difficult to fix. Here’s the script that I wrote. Basically we are setting the directory (probably redundant but I would rather play it safe), making the directory, applying the permission, and then enabling the compression.

You will need to go to a working server and export the permissions and run this first (I could let you have my file, but what admin would download a random file from some dude on the internet and run it? Not me!) Here’s the command that does that:

icacls "c:\inetpub\temp\IIS Temporary Compressed Files" /save cinetpubtempiiscompressedfiles.acl

 

Then place that file with your script and run it on the offending server.

******Script*********

mkdir "C:\inetpub\temp\IIS Temporary Compressed Files"

icacls c:\inetpub\temp\ /restore cinetpubtempiiscompressedfiles.acl

%windir%\system32\inetsrv\appcmd set config -section:system.webServer/httpCompression -directory:"C:\inetpub\temp\IIS Temporary Compressed Files"

%windir%\system32\inetsrv\appcmd set config -section:urlCompression /doDynamicCompression:true

******Script*********

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress