Chapter 11: Users and Applications
Overview
previous chapter and add extra functionality and features to demonstrate key concepts.ASP.NET stores information about a user session in a Session object. From the moment the user first starts to browse a site, you can access any code with the Session scope and use this, for example, to store information about the currently logged-in user. You can also add code that will remain in memory as long as the application is running. This could contain some in-memory data objects that are accessed frequently but don't often change. This technique protects the database from repeat requests for the same data, thereby improving the performance of the application.Another means of remembering information is using cookies – small text files that are created and stored on the client computer (assuming cookies are enabled on the client). A cookie can store information such as the number of times that a user has visited a site, whether the user has registered to receive email notifications, and so on.You can also add Application or Session scope configuration information that can store global settings, such as the length of a session until it expires or the connection string to a database. This information is stored in the web.config file. In addition, the application's security model can be configured using the information stored in this file.