Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
DataProtectorType Property

MachineKeySection.DataProtectorType Property

.NET Framework 4.6 and 4.5

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

Namespace:  System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

[ConfigurationPropertyAttribute("dataProtectorType", DefaultValue = "")]
[TypeConverterAttribute(typeof(WhiteSpaceTrimStringConverter))]
public string DataProtectorType { get; set; }

Property Value

Type: System.String
The name of the data protector type.

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.

.NET Framework

Supported in: 4.6, 4.5
Show:
© 2015 Microsoft