Chapter 9. Stateful Services

IN THIS CHAPTER

A stateful service is a Web Service that maintains data between WebMethod calls. Application state may include any piece of information that is required by the application to be stored and possibly recovered at a later stage. This information could be any of the following: user options, hit counts, shopping carts, catalogs, and any other of data that the application might need for the successful execution of its workflow.

State management for ASP.NET Web Services have the exact same options as those available for other ASP.NET applications. As long as the implementation of the Web Service derives from the WebService class, the application will have access to some of the common objects that any ASP.NET application has. These objects include the Session and Application objects.

This chapter will focus on the issue of maintaining state and the benefits of doing so. In particular, two important benefits of maintaining state are preventing unnecessary roundtrips to the server and keeping turn-around time to a minimum. We will examine three techniques for maintaining state—The Session object, the Application object, and the Cache object.

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

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