System.Web 1.0.5000.0 2.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Object System.Collections.ICollection

ASP.NET provides session-state management to enable you to store information associated with a unique browser session across multiple requests. You can store a collection of values referenced by a key name or by numerical index. Access to session values and functionality is available using the class, which is accessible through the property of the current , or the property of the .

Session data is associated with a specific browser session using a unique identifier. By default, this identifier is stored in a non-expiring session cookie in the browser, but you can also configure your application to store the session identifier in the URL by setting the cookieless attribute to true or in the sessionState element of your application configuration. You can have ASP.NET determine whether cookies are supported by the browser by specifying a value of for the cookieless attribute. You can also have ASP.NET determine whether cookies are enabled for the browser by specifying a value of for the cookieless attribute. If cookies are supported when is specified, or enabled when is specified, then the session identifier will be stored in a cookie; otherwise the session identifier will be stored in the URL.

Sessions are started during the first request and session values will persist as long as a new request is made by the browser before the number of minutes specified in the property pass. When a new session begins, the session event is raised. You can use this event to perform any additional work at the start of a session, such as setting default session values. When a session times out, the method is called, or the ASP.NET application is shut down, the session event is raised. You can use this event to perform any necessary cleanup. The event is raised only when the session state mode is set to .

To improve performance, sessions that use cookies do not allocate session storage until data is actually stored in the object. For more information, see the property.

Session state does not persist across ASP.NET application boundaries. If a browser navigates to another application, the session information is not available to the new application.

Session values are stored in memory on the Web server, by default. You can also store session values in a SQL Server database, an ASP.NET state server, or a custom server. This enables you to preserve session values in cases where the ASP.NET or IIS process or the ASP.NET application restarts and to make session values available across all the servers in a Web farm. This behavior is configured by setting the mode attribute to a valid value in the sessionState element of your application configuration. For more information, see Session State Modes.

Alternatives to session state include application state (see the property) and the ASP.NET cache (see the namespace), which store variables that can be accessed by all users of an ASP.NET application; the ASP.NET profile (see the namespace), which persists user values in a data store without expiring them using a time-out; ASP.NET , which persist control values in the ; ; the property; and fields on an HTML form that are available from an HTTP POST using the collection. For more details on the differences between session state and other state-management alternatives, see ASP.NET State-Management Recommendations.

Provides access to session-state values as well as session-level settings and lifetime management methods.

- Method
  System.Void

  Once the method is called, the current session is no longer valid and a new session can be started. causes the event to be raised. A new event will be raised on the next request.

  Session identifiers for abandoned or expired sessions are recycled by default. That is, if a request is made that includes the session identifier for an expired or abandoned session, a new session is started using the same session identifier. You can disable this by setting regenerateExpiredSessionId attribute of the sessionState configuration element to true. For more information, see Session Identifiers.

  The event is supported only when the property is set to .

  Cancels the current session.

  1.0.5000.0
  2.0.0.0
- Method
  System.Void `` ``

  If the parameter refers to an existing session state item, the existing item is overwritten with the specified .

  Adds a new item to the session-state collection.

  The name of the item to add to the session-state collection. The value of the item to add to the session-state collection. 1.0.5000.0 2.0.0.0
- Method
  System.Void To be added

  Removes all keys and values from the session-state collection.

  1.0.5000.0
  2.0.0.0
- Property
  System.Int32 To be added: an object of type 'int'

  A character set (code page) is used to interpret multi-byte character data, determining character value, and therefore sort order. Code-page settings apply only to multi-byte character data, not to Unicode character data.

  This property is provided for compatibility with earlier versions of ASP only. If you do not need to maintain backward compatibility with ASP pages, use the property instead.

  Gets or sets the character-set identifier for the current session.

  1.0.5000.0
  2.0.0.0
- Property
  System.Web.SessionState.HttpSessionState To be added: an object of type 'HttpSessionState'

  The property is provided for compatibility with earlier versions of ASP.

  Gets a reference to the current session-state object.

  1.0.5000.0
  2.0.0.0
- Method
  System.Void `` `` To be added

  Copies the collection of session-state values to a one-dimensional array, starting at the specified index in the array.

  The that receives the session values. The zero-based index in from which copying starts. 1.0.5000.0 2.0.0.0
- Property
  System.Int32 To be added: an object of type 'int' To be added

  Gets the number of items in the session-state collection.

  1.0.5000.0
  2.0.0.0
- Method
  System.Collections.IEnumerator To be added

  Returns an enumerator that can be used to read all the session-state variable names in the current session.

  An that can iterate through the variable names in the session-state collection.

  1.0.5000.0
  2.0.0.0
- Property
  System.Boolean To be added: an object of type 'bool'

  ASP.NET identifies sessions uniquely with each browser. By default, the unique identifier for a session is stored in a non-expiring session cookie in the browser. You can specify that session identifiers not be stored in a cookie by setting the cookieless attribute to true in the sessionState configuration element.

  To improve the security of your application, your application should allow users to log out, at which point it should call the method. This reduces the potential for an unwanted source using the unique identifier in the URL to retrieve private data stored in the session for a user.

  ASP.NET maintains cookieless session state by automatically inserting a unique session ID into the page's URL. For example, the following URL has been modified by ASP.NET to include the unique session ID lit3py55t21z5v55vlm25s55:

  `http://www.example.com/(S(4danlfat035muve4g0mvgfrr))/orderform.aspx`

  ASP.NET modifies the links contained in all requested pages by embedding a session-ID value in the links just before sending each page to the browser. Session state is maintained as long as the user follows the path of links that the site provides. However, if the user agent rewrites a URL, the session-state instance will be lost.

  The session ID is embedded in the URL after the slash that follows the application name and before any remaining file or virtual-directory identifier. This allows ASP.NET to resolve the application name before involving the in the request.

  By default, session identifiers used in cookieless sessions are recycled. That is, if a request is made with a session ID that has expired, a new session is started using the session ID supplied with the request. This behavior can result in the unwanted sharing of session data when a link that contains a cookieless session ID is shared with multiple browsers, perhaps through a search engine or other program. You can reduce the possibility of session data being shared by multiple clients by disabling the recycling of session identifiers. To do this, set the regenerateExpiredSessionId attribute of the sessionState configuration element to true. This will result in a new session ID being generated when a cookieless session request is made with an expired session ID. Note that if the request made with the expired session ID uses the HTTP POST method, then any posted data will be lost when regenerateExpiredSessionId is true, as ASP.NET performs a redirect to ensure that the browser has the new session identifier in the URL.

  While setting the regenerateExpiredSessionId attribute to true reduces the possibility of unwanted sharing of session data, it does not protect against an unwanted source gaining access to the session of another user by obtaining the value and including it in requests to the server. If you are storing private or sensitive information in session state, it is recommended that you use SSL to encrypt any communication between the browser and server that includes the .

  Gets a value indicating whether the session ID is embedded in the URL or stored in an HTTP cookie.

  1.0.5000.0
  2.0.0.0
- Property
  System.Boolean a To be added

  Gets a value indicating whether the session was created with the current request.

  1.0.5000.0
  2.0.0.0
- Property
  System.Boolean To be added: an object of type 'bool' To be added

  Gets a value indicating whether the session is read-only.

  1.0.5000.0
  2.0.0.0
- Property
  System.Boolean To be added: an object of type 'bool' To be added

  Gets a value indicating whether access to the collection of session-state values is synchronized (thread safe).

  1.0.5000.0
  2.0.0.0
- Property
  System.Object `` To be added: an object of type 'int' To be added To be added: an object of type 'object' To be added 1.0.5000.0 2.0.0.0
- Property
  System.Object `` To be added. To be added To be added: an object of type 'object' To be added 1.0.5000.0 2.0.0.0
- Property
  System.Collections.Specialized.NameObjectCollectionBase+KeysCollection a To be added

  Gets a collection of the keys for all values stored in the session-state collection.

  1.0.5000.0
  2.0.0.0
- Property
  System.Int32 To be added: an object of type 'int'

  The property is provided for compatibility with earlier versions of ASP only. If you do not need to maintain backward compatibility with ASP pages, use the property instead.

  ASP.NET does not store the locale identifier in session state. The property accesses the property to get and set the identifier.

  Gets or sets the locale identifier (LCID) of the current session.

  1.0.5000.0
  2.0.0.0
- Property
  System.Web.SessionState.SessionStateMode To be added: an object of type 'SessionStateMode'

  For information about how to configure your server for or session-state storage, see ASP.NET Session State Overview.

  Gets the current session-state mode.

  1.0.5000.0
  2.0.0.0
- Method
  System.Void ``

  If the session-state collection does not contain an element with the specified , the collection remains unchanged. No exception is thrown.

  Deletes an item from the session-state collection.

  The name of the item to delete from the session-state collection. 1.0.5000.0 2.0.0.0
- Method
  System.Void

  performs the same function as .

  Removes all keys and values from the session-state collection.

  1.0.5000.0
  2.0.0.0
- Method
  System.Void `` To be added

  Deletes an item at a specified index from the session-state collection.

  The index of the item to remove from the session-state collection. 1.0.5000.0 2.0.0.0
- Property
  System.String To be added: an object of type 'string'

  The property is used to uniquely identify a browser with session data on the server. The value is randomly generated by ASP.NET and stored in a non-expiring session cookie in the browser. The value is then sent in a cookie with each request to the ASP.NET application.

  If you want to disable the use of cookies in your ASP.NET application and still make use of session state, you can configure your application to store the session identifier in the URL instead of a cookie by setting the cookieless attribute of the sessionState configuration element to true, or to , in the Web.config file for your application. You can have ASP.NET determine whether cookies are supported by the browser by specifying a value of for the cookieless attribute. You can also have ASP.NET determine whether cookies are enabled for the browser by specifying a value of for the cookieless attribute. If cookies are supported when is specified, or enabled when is specified, then the session identifier will be stored in a cookie; otherwise the session identifier will be stored in the URL. For more information, see the property.

  The is sent between the server and the browser in clear text, either in a cookie or in the URL. As a result, an unwanted source could gain access to the session of another user by obtaining the value and including it in requests to the server. If you are storing private or sensitive information in session state, it is recommended that you use SSL to encrypt any communication between the browser and server that includes the .

  When using cookie-based session state, ASP.NET does not allocate storage for session data until the object is used. As a result, a new session ID is generated for each page request until the session object is accessed. If your application requires a static session ID for the entire session, you can either implement the Session_Start method in the application's Global.asax file and store data in the object to fix the session ID, or you can use code in another part of your application to explicitly store data in the object.

  If your application uses cookieless session state, the session ID is generated on the first page view and is maintained for the entire session.

  Gets the unique identifier for the session.

  1.0.5000.0
  2.0.0.0
- Property
  System.Web.HttpStaticObjectsCollection a

  If an object on a page does not support serialization and is out-of-process ( or ), the object will not be created and will not be added to this collection.

  The property is provided for compatibility with earlier versions of ASP.

  Gets a collection of objects declared by <object Runat="Server" Scope="Session"/> tags within the ASP.NET application file Global.asax.

  1.0.5000.0
  2.0.0.0
- Property
  System.Object To be added: an object of type 'object' To be added

  Gets an object that can be used to synchronize access to the collection of session-state values.

  1.0.5000.0
  2.0.0.0
- Property
  System.Int32 To be added: an object of type 'int'

  The property can be set in the Web.config file for an application using the timeout attribute of the sessionState configuration element, or you can set the property value directly using application code.

  The property cannot be set to a value greater than 525,600 minutes (1 year). The default value is 20 minutes.

  Gets and sets the amount of time, in minutes, allowed between requests before the session-state provider terminates the session.

  1.0.5000.0
  2.0.0.0