.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh
Melody Anderson
Eminent IT

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum


Posted By: Nagaraju     Posted Date: June 19, 2011    Points:5   Category :C#
Please Provide a good example for HttpHandlers.

Basic advantage of HttpHandlers? When we are going to use HttpHandlers.

I faced this question in an Interview. Please Help?

Author: Gowthammanju             
Posted Date: June 20, 2011     Points: 20   

HTTP Handlers are the .NET components which implement the System.Web.IHttpHandler interface.

HTTP handlers are somewhat similar to ISAPI extensions.

"ProcessRequest" is the IHttpHandler method which Enables processing of HTTP Web requests by a custom HttpHandler that implements the IHttpHandler interface.

HTTP Handlers are used to process individual endpoint requests. Handlers enable the ASP.NET framework to process individual HTTP URLs or groups of URL extensions within an application.

Thanks & Regards,

Mark if the answer is true
Author: Gowthammanju             
Posted Date: June 20, 2011     Points: 20   

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 via the page

To create a custom HTTP handler, you create a class that implements

The IHttpHandler interface to create a synchronous handler
The IHttpAsyncHandler to create an asynchronous handler.

Both handler interfaces require you to implement the IsReusable property and the ProcessRequest method.

The IsReusable property specifies whether the IHttpHandlerFactory object (the object that actually calls the appropriate handler) can place your handlers in a pool and reuse them to increase performance, or whether it must create new instances every time the handler is needed.

The ProcessRequest method is responsible for actually processing the individual HTTP requests.

Thanks & Regards,

Mark if the answer is true

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend