Export (0) Print
Expand All

MachineKeySection::DataProtectorType Property

.NET Framework 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(L"dataProtectorType", DefaultValue = L"")]
property String^ DataProtectorType {
	String^ get ();
	void set (String^ value);

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
© 2015 Microsoft