Some early IIS7 / ASP.NET Observations

In Germany was „Father’s Day“ today – well I am not a father – but I took this general bank holiday to do a “Spelunking Day”.

I always wondered how ASP.NET 2.0 integrates now into the radical new IIS7 pipeline model. So armed with Reflector and the Visual Studio debugger, I made some interesting observations.

The key to all this is that the .NET Framework version has changed from .42 to .88 on Vista. This makes it possible to add some ASP.NET plumbing for IIS7, e.g.

  • A new HttpWorkerRequest derived class is used for ASP.NET/IIS7 communication – System.Web.Hosting.IIS7WorkerRequest. This uses the new IIS7 API internally to throw the request information “over the fence”.
  • The IIS7TraceListener class allows using the new IIS 7 Tracing features from within ASP.NET
  • A new pipeline event has been introduced called LogRequest/PostLogRequest – this stage is used to log the results of the request, and is guaranteed to execute even if errors occur.
  • Modules can now inspect and manipulate the Response and Cookies collection on HttpResponse. Even if those headers and cookies were created by non ASP.NET code.
  • The HttpRequest.Headers collection is now write-enabled, allowing modules to manipulate the incoming request headers.
  • The HttpRequest.ServerVariables collection is also now writeable, allowing IIS server variables to be set. ASP.NET modules can use this functionality to change IIS provided values, and create new server variables that will be visible to other application frameworks, like classic ASP or PHP.

Now back to some real work…

 

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s