Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 67,640 times

Contents

Related Categories

Implementing HTTP Handlers in ASP.NET - Introduction

flanakin

Introduction

When I first started out, it was hard to find information on how to setup an ASP.NET HTTP handler. Of course, after time, I've found a wealth of articles, posts, and comments from others on these and other related topics. As my second post in the HTTP module/handler saga, I hope to give you an in-depth discussion on the topic of handlers to include pros, cons, and a sample implementation that you can extend.

Introduction

ASP.NET uses HTTP handlers to process all requests. For general information on HTTP handlers (and modules), see my previous article, Introduction to ASP.NET HTTP Modules and Handlers. In the following sections, I will discussĀ a few pros and cons of HTTP handlers and provide a step-by-step guide to implementing your own handler.

Most notably, HTTP handlers are beneficial because they provide a way to interact with HTTP requests before they get to a web page. This can be very nice, depending on what you need to do with the request. For instance, perhaps there is a need for logging actions taken by users or controlling access to individual files (i.e. images, executables). For the purposes of this article, I will discuss using handlers for URL rewriting.

This is intended to be a work in progress, so let me know if there is something extra that you'd like to see in it, or, if there are any mistakes/inconsistencies. Any other feedback is welcome, as well.

Michael Flanakin is a principal .NET software architect for the US Air Force and is the president of the Air Force .NET User Group, which serves .NET developers world-wide. Michael provides guidance to development groups on architectural and design issues to help ensure systems meet internal and external (industry) standards and are truly best-of-breed systems. Michael also manages the Air Force Component Library (AFCL), which is a class library to help extend the functionality provided within the .NET Framework to meet Air Force and DOD needs.

Comments