Export (0) Print
Expand All

SessionIDManager.Decode Method

Decodes a URL-encoded session identifier obtained from a cookie or the URL.

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

public virtual string Decode(
	string id
)

Parameters

id
Type: System.String

The session identifier to decode.

Return Value

Type: System.String
The decoded session identifier.

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

This method is used internally by the SessionIDManager class to decode custom SessionID values created by classes that inherit the SessionIDManager class and override the CreateSessionID and Validate methods. To ensure the fidelity of a custom session-identifier value retrieved from the HTTP request by the GetSessionID method, the SessionIDManager decodes the custom value using the UrlDecode method.

Notes to Inheritors

For an example of a class that inherits the SessionIDManager class and overrides the CreateSessionID and Validate methods, see the example provided for the CreateSessionID method.

.NET Framework

Supported in: 4.6, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft