What is HTTPContext and HTTPModule. What is the use of them?



What is HTTPContext and HTTPModule. What is the use of them?..

Answer / kk

HttpModule handles a application related events and
httpmodule serve the same purpose as does by ISAPi filter
for primitive ASP.Httpmodule by default have following
feature to support
Output Caching
Session State
Windows Authentication
Forms Authentication
Passport Authentication
Role Manager
URL Authorization
File Authorization
Anonymous Identification
Profile
One can make custome httpmodule and can place in web.config
so that at runtime it can process the chain of request as
and when comes .This can be identify through extension based
processing files.For an e.g there is custom class which when
invoke render charts as per the data input.This basically
can be wrapped in httpModule for processing and rendering
the class object at runtime.

HttpContext: This belongs to System.Web,this actually the
best way to read server response at runtime.

1)For example there is property and one want to get and set
the value of property that can easily be achieved through
httpcontext.

((CustomerClass)HttpContext.Current.Item).CustomerIDProperty=78;

2)similarly one can store the current context in collection
format.

HttpContext.Current.Items.Add("ERROR_MSG", exception.Message);
3) Can do server.transfer
HttpContext.Current.Server.Transfer("~/CriticalException.aspx",
false);
www.brainbell.com/tutorials/ASP/HttpModules.html

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

what is the auto option in XML ?

1 Answers  


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

0 Answers  


What are the memory-mapped files?

0 Answers  


What is the procedure to create the environment for asp.net? : asp.net mvc

0 Answers  


how to edit gridview control in asp.net2.0

1 Answers   3i Infotech,






What is cookieless session id explain in brief?

0 Answers  


What is the difference between a Thread and Process?

1 Answers  


Why do we use asp.net?

0 Answers  


What is the difference between union and join?

0 Answers  


what is AutoEventWireUp and what is the use of This property explain in details?

0 Answers   ITC Infotech,


Where we create sessions for Banking Applications and how to create? expalin with code?

1 Answers   Wipro,


How will you load dynamic assembly? How will create assesblies at run time?

0 Answers  


Categories