State Management

Flash Remoting provides support for ASP.NET state management by maintaining the session ID on all requests to the server. This allows ASP.NET to identify an existing session and application state.

In essence, a session is the server-side corollary of a client-side cookie. It is an object in the server’s memory that retains key information on a user throughout his visit to a web site. An example of state management across multiple pages is a login and validation system. A web form can pass login criteria, such as username and password, to an application. If the username and password are acceptable, a session variable containing the username is created. All subsequent requests to ASP.NET pages within the application can check if the user is logged in and, if so, display the user’s name.

ASP.NET also allows developers to customize their state management settings to loosen or tighten security. Typically, if a web user is inactive for 20 minutes, the session object for the user is destroyed. This time limit can be changed by tweaking the web.config file for your ASP.NET application.

Tip

Session and application state management is supported by ASP.NET pages and .NET XML web services, but not assemblies. Class libraries requiring state management must implement a custom solution or establish state through an ASP.NET page.

In addition to the benefits for ASP.NET applications, state management can be used by Flash Remoting. This can allow Flash applications to provide personalized ...

Get Flash Remoting: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.