SessionIDManager.Decode(String) 方法

定义

对从 Cookie 或 URL 获取的 URL 编码会话标识符进行解码。

public:
 virtual System::String ^ Decode(System::String ^ id);
public virtual string Decode (string id);
abstract member Decode : string -> string
override this.Decode : string -> string
Public Overridable Function Decode (id As String) As String

参数

id
String

要解码的会话标识符。

返回

String

已解码的会话标识符。

注解

此方法不是从应用程序代码调用的。

此类在内部SessionIDManager使用此方法解码由继承SessionIDManager类并重写CreateSessionIDValidate方法的类创建的自定义SessionID值。 若要确保该方法从 HTTP 请求 GetSessionID 检索到的自定义会话标识符值的保真度,请使用 SessionIDManager 该方法 UrlDecode 解码自定义值。

继承者说明

有关继承 SessionIDManager 类并重写 CreateSessionID(HttpContext)Validate(String) 方法的类的示例,请参阅为 CreateSessionID(HttpContext) 该方法提供的示例。

适用于

另请参阅