What is the role of global.asax?

Answer Posted / samantha jyesta

The Global.asax file is an optional file and can be stored
in root directory. This File is in accesible for web-sites.
This Global.asax file contained in HttpApplicationClass.
In Global.asax file we can declare global variables like for
example the variables used in master pages because same
variables can be used for different pages right.It provides
more security than others.
The Global.asax file is used to handle application-level
and session-level events.
we donot worry about configuring Global.asax because it is
itself configured.
This Global.asax file is designed like it
automatically rejects the requests comes from the browser.
Accessing the Global.asax file can not be possible.
while one request is in processing it is impossible to
send another request, we can not get response for other
request and even we can not start a new session.
while adding this Global.asax file to our application
it contains five methods
Those methods are:
1.Application_Start.
2.Application_End.
3.Session_Start.
4.Session_End.
5.Application_Error.

Is This Answer Correct ?    15 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we communicate with each server in N-tier Architecture? and what are the methods?

1792


What is work flow gen? how can it will work with .Net?

2576


If you want to write your own dot net language, what steps you will you take care?

524


What is the full form of asp.net?

533


Explain repository pattern in asp.net mvc? : asp.net mvc

531






What are sessions used for?

559


Difference between application events and session events

594


Which property is used to identify the Page is Post Back in ASP.NET?

558


What happens if an ASP.NET server control with event-handling routines is missing from its definition?

601


Diff between web user control and web custom control?

503


Explain server-side scripting and client-side scripting.

512


what is command line compiler.what are the steps and how it is related to debugging.

1417


Can one dll file contains the compiled code of more than one .net language?

540


What are directives in asp.net? List down all the important directives.

505


What's the ASP.Net Application life cycle?

566