Leveraging httpModules for Better ASP.NET Applications (Wrox Blox Wrox Blox Wrox Blox, #94) (Wrox Blox, #21)

by Chris Love

0 ratings • 0 reviews • 0 shelved
Book cover for Leveraging httpModules for Better ASP.NET Applications

Bookhype may earn a small commission from qualifying purchases. Full disclosure.

This Wrox Blox explains how to create different types of custom modules for ASP.NET web sites. Custom ASP.NET Modules are a great way to program advanced features to your web site. This Wrox blox discusses the difference between a custom httpModule and the Global.asax file. It also covers the steps in the ASP.NET pipeline. The examples include using a custom module to configure a site's initial settings, a background worker thread, and an IP blocker. Other examples show how to add content to the content being sent to the client, URL Rewriting, and a custom error handler.

Table of Contents

Introduction to httpModules 1

How httpModules Are Processed 2

Modules versus Global.asax 3

A Minimal Custom httpModule 3

ASP.NET Page Life Cycle 5

Registering a Custom httpModule 7

Default httpModules 7

Remove Registered Modules 8

Use a Custom Module to Configure the Site 9

Creating a Background Thread Process 11

Modify Rendered Content 13

Optimizing the Response Output 16

Create an IP Filter 22

Rewrite a Request 25

A Custom Error Handler 28

Custom Modules in IIS 7 32

Summary 35

About Chris Love 36

  • ISBN13 9781118035429
  • Publish Date 17 November 2010 (first published 5 May 2008)
  • Publish Status Active
  • Publish Country US
  • Publisher John Wiley & Sons Inc
  • Imprint Wrox Press