Monday, September 20, 2010

Enable ASPX Compression in IIS

Suggest taking a a backup copy of the file C:\Windows\System32\inetsrv\MetaBase.xml

WARNING: If you edit the metabase incorrectly, you can cause serious problems that may require you to reinstall any product that uses the metabase. Microsoft cannot guarantee that problems that result if you incorrectly edit the metabase can be solved. Edit the metabase at your own risk.

NOTE: Always back up the metabase before you edit it.

To enable IIS 5.0 to compress .aspx pages, follow these steps:
  1. Open a command prompt.
  2. Type net stop iisadmin, and then press ENTER.
  3. Type cd C:\InetPub\adminscripts, and then press ENTER.
  4. Type the following, and then press ENTER:
    CSCRIPT.EXE ADSUTIL.VBS SET W3Svc/Filters/Compression/GZIP/HcScriptFileExtensions "asp" "dll" "exe" "aspx"
  5. Type the following, and then press ENTER:
    CSCRIPT.EXE ADSUTIL.VBS SET W3Svc/Filters/Compression/DEFLATE/HcScriptFileExtensions "asp" "dll" "exe" "aspx"
  6. Type net start w3svc, and then press ENTER.

No comments:

Post a Comment