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("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

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft