HttpModule & HttpHandler

Concept

  1.   HttpHandler: Using to process that runs in response to a specific request made to an ASP.NET Web applicat
  2.   HttpModule:  It’s an assembly that is called on every request that is made to your application.

Scenarios

  1.    HttpHandler : RSS feeds,

  2.    HttpModule: Security, log , Custom footers and heads

Usage

  1. HttpHander:  Implements IHttpHandler or IHttpAsyncHandler, and register it in Web.config or IIS.
  2. HttpModule: Implements IHttpModule, and register it in Web.config or IIS.

Difference

  1. HttpHandler is used to process a specific request. HttpModule can process every request.
  2. Allow one more HttpModule in a web site, not allow one more HttpHander to process a specific request.
posted on 2010-05-31 17:50  AlecHF  阅读(208)  评论(0)    收藏  举报