The Artima Developer Community
Sponsored Link

.NET Buzz Forum
IIS 6 Compression and ASP.NET

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic    
Flat View: This topic has 0 replies on 1 page
Brad Wilson

Posts: 462
Nickname: dotnetguy
Registered: Jul, 2003

Brad Wilson is CTO of OneVoyce, Inc.
IIS 6 Compression and ASP.NET Posted: Jul 9, 2003 9:21 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Brad Wilson.
Original Post: IIS 6 Compression and ASP.NET
Feed Title: The .NET Guy
Feed URL: /error.aspx?aspxerrorpath=/dotnetguy/Rss.aspx
Feed Description: A personal blog about technology in general, .NET in specific, and when all else fails, the real world.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Brad Wilson
Latest Posts From The .NET Guy

Advertisement

I set off on a task this morning of getting compression working on a Windows Server 2003 box running our ASP.NET application. I'm writing about it, so it must have required some non-trivial work, right? Right.

If you follow these directions from Microsoft, you'll have compression enabled, but still non-functional. There are two pieces to the puzzle that they don't share with you.

1. Allow the compression ISAPI to run

IIS 6's new security system prohibits ISAPI DLLs from running by default, so you need to tell IIS 6 that it's okay to let the compression ISAPI DLL run.

Open the IIS admin tool, drill into your server, and right-click on "Web Service Extensions". Choose "Add a new web service extension". For the extension name, use whatever you want to identify it in the list (I used "HTTP Compression"). You need to add a single required file, which is \Windows\System32\inetsrv\gzip.dll, the ISAPI responsible for doing gzip and deflate compression. Check the "Set extension status to allowed", then click OK. You should have a new web service extension in your list called "HTTP Compression" (or whatever you named it), and it should have a status of "Allowed".

2. Select compressible content

IIS 6's compression system only compresses a very limited set of content. You need to enable compression for the appropriate file extensions (specifically, .aspx files for your ASP.NET pages, and perhaps any static content you want compressed as well).

You're going to edit the Metabase. To do this, you first need to shut down IIS. In the IIS admin tool, right click on your server name in the left panel, and choose All Tasks -> Restart IIS. On the restart dialog, choose "Stop internet services" and click OK. When IIS is shut down, you'll need to edit \Windows\System32\inetsrv\MetaBase.xml (make a backup first!). Search for "IIsCompressionScheme". There will be two XML elements, one for deflate and one for gzip. Both elements have properties called HcFileExtensions and HcScriptFileExtensions. These contain a space-delimited list of file extension for compressible content. At a bare minimum, you'll need to add aspx to the HcScriptFileExtensions list. Note that if the properties are left blank, then all content, regardless of file extension, will be compressed.

That's it! Good luck, and be careful. :)

Read: IIS 6 Compression and ASP.NET

Topic: Rockets on Prisoner Award Previous Topic    

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use