Επεξεργασία

Κοινή χρήση μέσω


MachineKeySection.DataProtectorType Property

Definition

Gets or sets the name of the data protector type. The default is 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

Property Value

The name of the data protector type.

Attributes

Remarks

To specify custom data protection algorithms for ASP.NET, set the MachineKeySection.CompatibilityMode property to Framework45 and set this property to a string that represents a class that derives from the DataProtector class. This string corresponds to the providerClass parameter that is passed to the static DataProtector.Create factory method. The class you specify is used by the MachineKey.Protect and MachineKey.Unprotect methods even if you do not specify the Framework45 option.

If you set this property, you must also set the ApplicationName property.

Applies to