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


Top 5 Contributors of the Month
david stephan

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

HttpHandlers

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?

Responses
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,
GowthamManju
Chennai



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
handler.

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

The IHttpHandler interface to create a synchronous handler
or
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,
GowthamManju
Chennai



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
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

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