System.Web.SessionState.SessionIDManager.Validate Method

Gets a value indicating whether a session identifier is valid.

Syntax

public virtual bool Validate (string id)

Parameters

id
The session identifier to validate.

Returns

true if the session identifier is valid; otherwise, false.

Remarks

This method is not intended to be called from application code.

The SessionIDManager.Validate(string) method verifies that the supplied id is a 24-character string consisting of lowercase characters from a to z and numbers from 0 to 5 and that the maximum length of the session ID does not exceed 80 characters.

The SessionIDManager.GetSessionID(System.Web.HttpContext) method calls the SessionIDManager.Validate(string) method when retrieving a session identifier from an HTTP request, to ensure that the supplied session identifier is properly formatted.

Requirements

Namespace: System.Web.SessionState
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0