MachineKeySection.DataProtectorType 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定資料保護器的名稱。 預設值為 Empty。
public:
property System::String ^ DataProtectorType { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))]
[System.Configuration.ConfigurationProperty("dataProtectorType", DefaultValue="")]
public string DataProtectorType { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))>]
[<System.Configuration.ConfigurationProperty("dataProtectorType", DefaultValue="")>]
member this.DataProtectorType : string with get, set
Public Property DataProtectorType As String
屬性值
資料保護器的名稱。
- 屬性
備註
若要指定 ASP.NET 的自訂資料保護演算法,將屬性Framework45設MachineKeySection.CompatibilityMode為,並將此屬性設為代表從該DataProtector類別衍生的類別的字串。 這串字串對應 providerClass 於傳遞給靜態 DataProtector.Create 工廠方法的參數。 你指定的類別會被 MachineKey.Protect and MachineKey.Unprotect 方法使用,即使你沒有指定選項。Framework45
如果你設定了這個屬性,你也必須設定該 ApplicationName 屬性。