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 指定自定义数据保护算法,请将 MachineKeySection.CompatibilityMode 该属性设置为该属性 Framework45 并将其设置为表示派生自该类的类的 DataProtector 字符串。 此字符串对应于 providerClass 传递给静态 DataProtector.Create 工厂方法的参数。 即使未指定Framework45选项,你指定的类也由MachineKey.Protect方法和MachineKey.Unprotect方法使用。
如果设置此属性,则还必须设置该 ApplicationName 属性。