Qus:    What are the event handlers that we can have in Global.asax file?
Oct 17, 2020 08:33 2 Answers Views: 3 SHIVA
Prev Next
Answers (2)
ARUNA Oct 19, 2020 02:38
Answer:   Application Events: Application_Start , Application_End, Application_AcquireRequestState, Application_AuthenticateRequest, Application_AuthorizeRequest, Application_BeginRequest, Application_Disposed, Application_EndRequest, Application_Error, Application_PostRequestHandlerExecute, Application_PreRequestHandlerExecute,Application_PreSendRequestContent, Application_PreSendRequestHeaders, Application_ReleaseRequestState, Application_ResolveRequestCache, Application_UpdateRequestCache
Session Events: Session_Start,Session_End

PARTH Oct 19, 2020 04:28
Answer:   Following are the event handlers that we can have in Global.asax file:-

Application_BeginRequest() – fired when a request for the web application comes in.

Application_AuthenticateRequest –fired just before the user credentials are authenticated. You can specify your own authentication logic over here.

Application_AuthorizeRequest() – fired on successful authentication of user’s credentials. You can use this method to give authorization rights to user.

Application_ResolveRequestCache() – fired on successful completion of an authorization request.

Application_AcquireRequestState() – fired just before the session state is retrieved for the current request.

Application_PreRequestHandlerExecute() - fired before the page framework begins before executing an event handler to handle the request.

Application_PostRequestHandlerExecute() – fired after HTTP handler has executed the request.

Application_ReleaseRequestState() – fired before current state data kept in the session collection is serialized.

Application_UpdateRequestCache() – fired before information is added to output cache of the page.

Application_EndRequest() – fired at the end of each request

Application_Start() – fired when the first resource is requested from the web server and the web application starts.

Session_Start() – fired when session starts on each new user requesting a page.

Application_Error() – fired when an error occurs.

Session_End() – fired when the session of a user ends.

Application_End() – fired when the web application ends.

Application_Disposed() - fired when the web application is destroyed.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let's Connect