what are Httpmodule and HttpHandler?

Answers were Sorted based on User's Feedback



what are Httpmodule and HttpHandler?..

Answer / rituparno

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.

An HTTP handler can be either synchronous or asynchronous.
A synchronous handler does not return until it finishes
processing the HTTP request for which it is called. An
asynchronous handler runs a process independently of
sending a response to the user. Asynchronous handlers are
useful when you must start an application process that
might be lengthy and the user does not have to wait until
it finishes before receiving a response from the server.

Is This Answer Correct ?    33 Yes 3 No

what are Httpmodule and HttpHandler?..

Answer / sarat

HTTP Handler :

HTTP handlers are the .NET components that implement the
System.Web.IHttpHandler interface. Any class that implements
the IHttpHandler interface can act as a target for the
incoming HTTP requests. HTTP handlers are somewhat similar
to ISAPI extensions. One difference between HTTP handlers
and ISAPI extensions is that HTTP handlers can be called
directly by using their file name in the URL.

HTTP handlers implement the following methods:
ProcessRequest - This method is actually the heart of all
http handlers.
IsReusable - This property is called to determine whether
this instance of http handler can be reused for fulfilling
another request of the same type. HTTP handlers can return
either true or false in order to specify whether they can be
reused.

We can use <httpHandlers> and <add> nodes for adding HTTP
handlers to our Web applications. In fact the handlers are
listed with <add> nodes in between <httpHandlers> and
</httpHandlers> nodes.
Ex: <httpHandlers>
<add verb="supported http verbs" path="path"
type="namespace.classname, assemblyname" />
<httpHandlers>
(In this verb=GET/POST/HEAD path=path for
incoming HTTP requests type=…)



HTTP Module :

Http modules are called before and after the http handler
executes. Http modules enable developers to participate in,
or modify each individual request. Http modules implement
the IHttpModule interface, which is located in the
System.Web namespace.

Available Events: BeginRequest, AuthenticateRequest,
AuthorizeRequest, EndRequest, etc.
Configuring HTTP Modules: In web.config
Ex: <system.web>
<httpModules>
<add name="MyModule"
type="MyModule.SyncModule, MyModule" />
</httpModules>
</system.web>
Creating HTTP Modules: To create an HTTP module, you must
implement the IHttpModule interface, The IHttpModule
interface has two methods with the following signatures:
void Init(HttpApplication);
void Dispose();

Is This Answer Correct ?    16 Yes 1 No

what are Httpmodule and HttpHandler?..

Answer / divya

http handler is a information between the web browser and
web server

Is This Answer Correct ?    16 Yes 25 No

Post New Answer

More ASP.NET Interview Questions

What is the function of the CustomValidator? a) It allows for custom C# client-side code to validate entries in a control. b) It allows for a custom mixture of validator controls to use one central control for the display of messages. c) It uses scripted client-side code to validate the entry in a control. d) It uses server-side code to validate the entry in a control.

4 Answers   ABC, Syntax Softtech, TCS,


Define static member?

0 Answers  


What data type does the RangeValidator control support?

3 Answers   Visual Soft,


How to convert a string into an Integer in ASP.net?

12 Answers  


What is asp.net file?

0 Answers  






Explain the functionality of "EnableViewState" ? What happens if you want it on or off?

1 Answers   Siebel,


asp.net interview questions

0 Answers  


What are the parts of an http response?

0 Answers  


hi guys do u know how to go one page to one page to another page plz tell me any of u know

3 Answers  


What is the mvc framework?

0 Answers  


How do I send an email message from my ASP.NET page?

0 Answers  


What?s the difference between Codebehind="MyCode.aspx.cs" and Src="MyCode.aspx.cs"?

1 Answers   Getit, Siebel, Visual Soft,


Categories