MachineKeySection.DataProtectorType Property

Definition

Gets or sets the name of the data protector type. The default is Empty.

C#
[System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))]
[System.Configuration.ConfigurationProperty("dataProtectorType", DefaultValue="")]
public string DataProtectorType { get; set; }

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

Производ Верзије
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1