Custom State Management

Up to now, this chapter has covered the built-in functionality needed for state management provided from within the .NET framework.

Custom state management is a term given to user-defined mechanisms that are created to manage state outside of the functionality provided from within the .NET framework. Custom state management is a solution that needs to be developed from scratch. One of the advantages of using the built-in state management functionality is that it suits a vast majority of application state management needs. In contrast, custom state management that is developed for one application may not match the needs of another.

Some of the custom state management scenarios that have been developed include persisting state to disk and managing state using a database. They were created due to a lack of required functionality before .NET.

Managing State as a Web Service

Using a Web Service as a data store has similar advantages to the out-of-process state management options. Because the Web Service used to manage the state would exist in a separate process, or even on a separate machine, the state would be preserved, even if the ASP.NET service was recycled. A major advantage of using a Web Service to manage state is that the state is available to other applications that are not running within Microsoft Internet Information Server.

The major downside with this mechanism is that there is no ready-built solution that can be used. This is a do-it-yourself technique, meaning that the code and logic would have to be developed entirely from scratch.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.186.63