in Education by
Describe application state management in ASP.NET?

1 Answer

0 votes
by

Application Level State Management is used to maintain the state of all the users accessing the web forms present within the website.

The value assigned for an application is considered as an object.

Application object will not have any default expiration period.

Whenever the webserver has been restarted or stopped then the information maintained by the application object will be lost.

If any data is stored on the application object then that information will be shared upon all the users accessing the webserver.

Since the information is shared among all the users, it is advisable to lock and unlock the application object as per requirement.

Global Application Class(Global.asax)

It is a Class which consists of event handlers which executes the code implicitly whenever a relevant task has been performed on the web server.Design:  

  1. <%@ Application Language="C#" %>  
  2.     <script runat="server">  
  3.     void Application_Start(object sender, EventArgs e)  
  4.     {  
  5.         // Code that runs on application startup  
  6.     }  
  7.     void Application_End(object sender, EventArgs e)  
  8.     {  
  9.         // Code that runs on application shutdown  
  10.     }  
  11.     void Application_Error(object sender, EventArgs e)  
  12.     {  
  13.         // Code that runs when an unhandled error occurs  
  14.     }  
  15.     void Session_Start(object sender, EventArgs e)  
  16.     {  
  17.         // Code that runs when a new session is started  
  18.     }  
  19.     void Session_End(object sender, EventArgs e)  
  20.     {  
  21.         // Code that runs when a session ends.   
  22.     }  
  23.     </script>  

Related questions

0 votes
    What are the different Session state management options available in ASP.NET?...
asked Apr 6, 2021 in Education by JackTerrance
0 votes
    How can we apply themes in ASP.NET application?...
asked Apr 6, 2021 in Education by JackTerrance
0 votes
0 votes
    How can we improve the Performance of an ASP.NET Web Page?...
asked Apr 8, 2021 in Education by JackTerrance
0 votes
    What is Enterprise Library in ASP.NET?...
asked Apr 8, 2021 in Education by JackTerrance
0 votes
    What is Data Cache in ASP.NET and how to use?...
asked Apr 8, 2021 in Education by JackTerrance
0 votes
0 votes
    What are the Navigations techniques in ASP.NET?...
asked Apr 8, 2021 in Education by JackTerrance
0 votes
0 votes
    Explain Cookie-less Session in ASP.NET?...
asked Apr 8, 2021 in Education by JackTerrance
0 votes
    What is the PostBack property in ASP.NET?...
asked Apr 8, 2021 in Education by JackTerrance
0 votes
0 votes
    What is cross-page posting in ASP.NET?...
asked Apr 7, 2021 in Education by JackTerrance
0 votes
    What are the differences between ASP.NET HttpHandler and HttpModule?...
asked Apr 7, 2021 in Education by JackTerrance
0 votes
    What is page directives in ASP.NET?...
asked Apr 7, 2021 in Education by JackTerrance
...