ASP.NET and its State of Application
Search:

Home | Www - Internet | Web Designing


ASP.NET and its State of Application

By: christine layug

ASP.NET is a web application framework developed and marketed by Microsoft, which programmers can use to build dynamic web sites, web applications and web services.
ASP.NET applications are hosted in a web server and are accessed over the stateless HTTP protocol. As such, if the application uses stateful interaction, it has to implement state management on its own.
ASP.NET provides various functionality for state management in ASP.NET applications, these state management includes application state, session state, and view state.
Application state is a collection of user-defined variables that are shared by all invocations of an ASP.NET application. These are set and initialized when the Application_OnStart event fires on the loading of the first instance of the applications and are available till the last instance exits.
Application state variables are accessed using the Applications collection, which provides a wrapper for the application state variables. Application state variables are identified by names. Learn more about this with the austin .net developer.
Session state is a collection of user-defined session variables, which are persisted during a user session. These variables are unique to different instances of a user session, and are accessed using the Session collection. Session variables can be set to be automatically destroyed after a defined time of inactivity, even if the session does not end. Learn more about this with the austin .net developer.
ASP.NET supports three modes of persistence for session variables: the In Process Mode, ASPState Mode, and SqlServer Mode.
On the In Process Mode, the session variables are maintained within the ASP.NET process. This is the fastest way, however, in this mode the variables are destroyed when the ASP.NET process is recycled or shut down. Since the application is recycled from time to time this mode is not recommended for critical applications.
In ASPState Mode, ASP.NET runs a separate Windows service that maintains the state variables. Because the state management happens outside the ASP.NET process, this has a negative impact on performance, but it allows multiple ASP.NET instances to share the same state server, thus allowing an ASP.NET application to be load-balanced and scaled out on multiple servers.
In the SqlServer Mode, the state variables are stored in a database server, accessible using SQL. Session variables can be persisted across ASP.NET process shutdowns in this mode as well. The main advantage of this mode is it would allow the application to balance load on a server cluster while sharing sessions between servers. Learn more about these with the austin .net developer.
View state refers to the page-level state management mechanism, which is utilized by the HTML pages emitted by ASP.NET applications to maintain the state of the web form controls and widgets. The server sends back the variable so that when the page is re-rendered, the controls render at their last state.
At the server side, the application might change the viewstate, if the processing results in updating the state of any control. The states of individual controls are decoded at the server, and are available for use in ASP.NET pages using the ViewState collection. For more information about ASP.NET and its features, then visit the austin .net developer for more details.

Article Source: http://www.rightarticle.com

www.astonishdesigns.com





Please Rate this Article

 

Not yet Rated

Click the XML Icon Above to Receive Web Designing Articles Via RSS!

Powered by Article Dashboard