web analytics

Understanding the Architectrure of IIS and ASP.NET

Options

codeling 1602 - 6666
@2016-12-15 15:59:58

ASP.NET on IIS 6

In IIS 6.0 and previous releases, ASP.NET was implemented as an IIS ISAPI extension.

A request to an ASP.NET content type would be first processed by IIS, and then forwarded to the ASP.NET ISAPI DLL, which hosted the ASP.NET request pipeline and page framework. Requests to non-ASP.NET content, such as ASP pages, or static files, would be processed by IIS or other ISAPI extensions and were not visible to ASP.NET.

The major limitation of this model is the fact that services provided by ASP.NET modules, and custom ASP.NET application code, was not available to non-ASP.NET requests. In addition, ASP.NET modules were unable to affect certain parts of IIS request processing that occurred before and after the ASP.NET execution path.

 

@2016-12-15 16:04:32

ASP.NET on IIS 7.0

In IIS 7.0, the ASP.NET request processing pipeline overlays the IIS pipeline directly, essentially providing a wrapper over it instead of plugging into it.

A request arriving for any content type is processed by IIS 7.0, with both native IIS modules and ASP.NET modules able to provide request processing in all stages. This enables services provided by ASP.NET modules like Forms Authentication or Output Cache to be used for requests to ASP pages, PHP pages, static files, and so on.

The ability to plug in directly into the server pipeline allows ASP.NET modules to replace, run before, or run after any IIS 7.0 functionality. This enables, for example, a custom ASP.NET basic authentication module written to use the Membership service and SQL Server user database to replace the built in IIS basic authentication feature that works only with Windows accounts.

In addition, the expanded ASP.NET APIs take advantage of direct integration to enable more request processing tasks. For example, ASP.NET modules can modify request headers before other components process the request, inserting an Accept-Language header before ASP applications execute in order to force localized content to be sent back to the client based on user preference.

IIS 7.0's Integrated Mode

Because of the runtime integration, IIS 7.0 and ASP.NET can use the same configuration for enabling and ordering server modules, and configuring handler mappings. Other unified functionality includes tracing, custom errors, and output caching.

ASP.NET Enhancements on IIS 7.0

Better ASP.NET integration in IIS 7.0 both enhances existing applications, and allows new applications to take advantage of ASP.NET features in new ways:

  • ASP.NET services can be used for all content types. In the past, ASP.NET functionality such as Forms Authentication, Roles, URL Authorization, and Output Caching were only available to ASP.NET content types (ASPX pages, for example). Static files, ASP pages, and other content types could not benefit from these services.

In IIS 7.0, all ASP.NET services are provided uniformly to all content. For example, you can protect all of your web content, including images and ASP pages with your existing ASP.NET 2.0 access control solution built on ASP.NET Forms Authentication, Membership and Login controls.

  • Fully extend IIS with ASP.NET. Previous versions of IIS frequently required server extensibility to be developed using the native ISAPI filter or extension extensibility mode, due to the runtime limitations of ASP.NET.

IIS 7.0 allows ASP.NET modules to plug in directly into the server pipeline, with the same runtime fidelity as modules developed with the native (C++) server API. ASP.NET modules can execute in all runtime stages of the request processing pipeline, and be executed in any order with respect to native modules. The ASP.NET API is also expanded to allow more control over request processing then was previously possible.

  • Unified server runtime. Tighter ASP.NET integration also allows many of the features between IIS 7.0 and ASP.NET to be unified.
     

IIS 7.0 features unified configuration for IIS and ASP.NET modules and handlers. Many other features, including custom errors, and tracing, have been unified to allow better management and cohesive application design.

Comments

You must Sign In to comment on this topic.


© 2024 Digcode.com