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

Is asp.net a programming language?

0 Answers  


what are the new server controls added in Asp.net 2.0?

1 Answers   DOSPL,


What is the application pool?

0 Answers  


• What are HttpHandlers? • What are HttpModules?

2 Answers  


What are the two properties that are common on every validation control?

0 Answers   Siebel,






What is the main difference between grid layout and flow layout?

1 Answers  


What are Master Pages in ASP.NET?

0 Answers  


1.how to encrpt query string in asp.net? 2.there are 10000 records then i wnat display 5000 records one gridview and 5000 records another grid view what is the process?

2 Answers   Marlabs,


What is asp.net with mvc? : Asp.Net MVC

0 Answers  


Which control would you use if you needed to make sure the values in two different controls matched?

2 Answers  


Master Page

1 Answers   Syntel,


Trigger syntax in sql2000

1 Answers   Wipro,


Categories