SessionIDManager.Decode(String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
解碼由 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
解碼時會話識別碼。
傳回
解碼後的會話識別碼。
備註
此方法並非設計用來從應用程式程式碼呼叫。
這個方法由類別內部SessionIDManager使用,用來解碼由繼承該SessionID類別並覆寫 SessionIDManager and CreateSessionID 方法所建立的自訂Validate值。 為了確保方法從 HTTP 請求 GetSessionID 中取得的自訂會話識別碼值的準確性,該 SessionIDManager 方法會解 UrlDecode 碼該自訂值。
給繼承者的注意事項
關於繼承類別 SessionIDManager 並覆 CreateSessionID(HttpContext) 寫 and Validate(String) 方法的範例,請參考該方法的 CreateSessionID(HttpContext) 範例。