First , the way asp.net handles each request is just like in a pipeline. HTTPModule and HTTPHandler are the two processing point of this pipeline.
1, HTTPModule:
It's just like a filter. The Modules are called before and after the handler executes.
For example: BeginRequest, AuthenticationRequest event, EndRequest event etc. You may intercept , participate and modify each request.
Modules implement the IHttpMudule interface located in the System.Web.System.
2, HTTPHandler:
You may think it as a program.(or handler, or module), it execute some code when the user send some request. An .aspx page can be thought as a HTTPHandler too, which implements more functions.
Thanks landlost. but my question is even inside the BeginRequest or AuthenticationRequest in global.asax we can write the code we want so what is point of intercepting? Pls forgive if i am wrong.
Thanks landlost. but my question is even inside the BeginRequest or AuthenticationRequest in global.asax we can write the code we want so what is point of intercepting? Pls forgive if i am wrong.
Ram
Here are some resouces maybe you need. Hope it helps.
Intercept, Monitor, and Modify Web Requests with HTTP Filters in ISAPI and ASP.NET
An ASP.NET HTTP handler is the process (frequently referred to as the "endpoint") that runs in response to a request made to an ASP.NET Web application. The most common handler is an ASP.NET page handler that processes .aspx files. When users request an
.aspx file, the request is processed by the page through the page handler. You can create your own HTTP handlers that render custom output to the browser.
An HTTP module is an assembly that is called on every request that is made to your application. HTTP modules are called as part of the ASP.NET request pipeline and have access to life-cycle events throughout the request. HTTP modules let you examine incoming
and outgoing requests and take action based on the request.
Typical uses for custom HTTP handlers include the following:
RSS feeds To create an RSS feed for a Web site, you can create a handler that emits RSS-formatted XML. You can then bind a file name extension such as .rss to the custom handler. When users send a request to your site that ends in .rss, ASP.NET
calls your handler to process the request.
Image server If you want a Web application to serve images in a variety of sizes, you can write a custom handler to resize images and then send them to the user as the handler's response.
Typical uses for HTTP modules include the following:
Security Because you can examine incoming requests, an HTTP module can perform custom authentication or other security checks before the requested page, XML Web service, or handler is called. In Internet Information Services (IIS) 7.0 running
in Integrated mode, you can extend forms authentication to all content types in an application.
Statistics and logging Because HTTP modules are called on every request, you can gather request statistics and log information in a centralized module, instead of in individual pages.
Custom headers or footers Because you can modify the outgoing response, you can insert content such as custom header information into every page or XML Web service response.
HTTPModule and HttpHandler
Please mark the answer if it helps you.
Ramani Sandeep (My Blog)
(MCTS, MCC-2011)
Marked as answer by Mikesdotnetting on May 15, 2011 08:39 PM
An HTTP module is an assembly that is called on every request that is made to your application. HTTP modules are called as part of the ASP.NET request pipeline and have access to life-cycle events throughout the request. HTTP modules let you examine incoming
and outgoing requests and take action based on the request.
An ASP.NET HTTP handler is the process (frequently referred to as the "endpoint") that runs in response to a request made to an ASP.NET Web application. The most common handler is an ASP.NET page handler that processes .aspx files. When users request an
.aspx file, the request is processed by the page through the page handler. You can create your own HTTP handlers that render custom output to the browser.
askramm
Member
30 Points
6 Posts
What is HTTPModule and HttpHandler
Jul 25, 2006 04:59 PM|LINK
Pls explain me in plain words what is HTTPModule and HttpHandler?
Ram
lostlander
Contributor
3041 Points
607 Posts
Re: What is HTTPModule and HttpHandler
Jul 26, 2006 03:13 AM|LINK
First , the way asp.net handles each request is just like in a pipeline. HTTPModule and HTTPHandler are the two processing point of this pipeline.
1, HTTPModule:
It's just like a filter. The Modules are called before and after the handler executes.
For example: BeginRequest, AuthenticationRequest event, EndRequest event etc. You may intercept , participate and modify each request.
Modules implement the IHttpMudule interface located in the System.Web.System.
2, HTTPHandler:
You may think it as a program.(or handler, or module), it execute some code when the user send some request. An .aspx page can be thought as a HTTPHandler too, which implements more functions.
For may Information, Pls refer to:
<div class=title>http://www.15seconds.com/issue/020417.htm
HTTP Handlers and HTTP Modules in ASP.NET
</div>http://support.microsoft.com/kb/308001/EN-US/
How To Create an ASP.NET HTTP Handler by Using Visual C# .NET
http://msdn2.microsoft.com/en-us/library/ms227675.aspx
<div class=majorTitle>ASP.NET </div> <div class=title>Introduction to HTTP Handlers</div> <div class=title> </div> <div class=title>http://msdn2.microsoft.com/en-us/library/tfd6k449.aspx</div> <div class=title>How to: Create and Configure an HTTP Module</div> <div class=title> </div> <div class=title>http://windowssdk.msdn.microsoft.com/en-us/library/tkwek5a4.aspx</div> <div class=title> <div class=majorTitle>ASP.NET Configuration </div> <div class=title>Example Configuration Code for an HTTP Module</div> <div class=title> </div> <div class=title> </div></div>RamSVel
Member
20 Points
4 Posts
Re: What is HTTPModule and HttpHandler
Jul 26, 2006 05:21 PM|LINK
Thanks landlost. but my question is even inside the BeginRequest or AuthenticationRequest in global.asax we can write the code we want so what is point of intercepting? Pls forgive if i am wrong.
Ram
lostlander
Contributor
3041 Points
607 Posts
Re: What is HTTPModule and HttpHandler
Jul 28, 2006 05:01 AM|LINK
Here are some resouces maybe you need. Hope it helps.
Intercept, Monitor, and Modify Web Requests with HTTP Filters in ISAPI and ASP.NET
http://msdn.microsoft.com/msdnmag/issues/02/08/HTTPFilters/default.aspx
HttpHandlers and HttpModules
http://www.awprofessional.com/articles/article.asp?p=25339&seqNum=3&rl=1
sandy060583
Star
8714 Points
1624 Posts
Re: What is HTTPModule and HttpHandler
Sep 21, 2009 06:35 AM|LINK
An ASP.NET HTTP handler is the process (frequently referred to as the "endpoint") that runs in response to a request made to an ASP.NET Web application. The most common handler is an ASP.NET page handler that processes .aspx files. When users request an .aspx file, the request is processed by the page through the page handler. You can create your own HTTP handlers that render custom output to the browser.
An HTTP module is an assembly that is called on every request that is made to your application. HTTP modules are called as part of the ASP.NET request pipeline and have access to life-cycle events throughout the request. HTTP modules let you examine incoming and outgoing requests and take action based on the request.
Typical uses for custom HTTP handlers include the following:
RSS feeds To create an RSS feed for a Web site, you can create a handler that emits RSS-formatted XML. You can then bind a file name extension such as .rss to the custom handler. When users send a request to your site that ends in .rss, ASP.NET calls your handler to process the request.
Image server If you want a Web application to serve images in a variety of sizes, you can write a custom handler to resize images and then send them to the user as the handler's response.
Typical uses for HTTP modules include the following:
Security Because you can examine incoming requests, an HTTP module can perform custom authentication or other security checks before the requested page, XML Web service, or handler is called. In Internet Information Services (IIS) 7.0 running in Integrated mode, you can extend forms authentication to all content types in an application.
Statistics and logging Because HTTP modules are called on every request, you can gather request statistics and log information in a centralized module, instead of in individual pages.
Custom headers or footers Because you can modify the outgoing response, you can insert content such as custom header information into every page or XML Web service response.
HTTPModule and HttpHandler
Ramani Sandeep (My Blog)
(MCTS, MCC-2011)
Maujiram
Member
4 Points
2 Posts
Re: Server Error in '/' Application.
Sep 28, 2009 08:41 AM|LINK
hello....guys
i'm new in website development field. i hav found an error which indicates in subject field.
any body help me.
i'm using these tools.
iis5.1,vs2008,vb3.5 and host on godaddy with iis7.0
please help me.
maujiram
sunilsingh
Member
132 Points
64 Posts
Re: Server Error in '/' Application.
Jun 28, 2010 06:18 AM|LINK
Hi Mauji,
You are not specifying the correct url to access the page.
SunilSingh
Remember to click Mark as Answer on the post that helps to others.
Rakesh.choud...
Member
2 Points
1 Post
Re: Server Error in '/' Application.
Nov 10, 2010 09:34 AM|LINK
An HTTP module is an assembly that is called on every request that is made to your application. HTTP modules are called as part of the ASP.NET request pipeline and have access to life-cycle events throughout the request. HTTP modules let you examine incoming and outgoing requests and take action based on the request.
An ASP.NET HTTP handler is the process (frequently referred to as the "endpoint") that runs in response to a request made to an ASP.NET Web application. The most common handler is an ASP.NET page handler that processes .aspx files. When users request an .aspx file, the request is processed by the page through the page handler. You can create your own HTTP handlers that render custom output to the browser.