MachineKeySection.DataProtectorType Właściwość

Definicja

Pobiera lub ustawia nazwę typu ochrony danych. Wartość domyślna to 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

Wartość właściwości

Nazwa typu ochrony danych.

Atrybuty

Uwagi

Aby określić niestandardowe algorytmy ochrony danych dla ASP.NET, ustaw MachineKeySection.CompatibilityMode właściwość na Framework45 i ustaw tę właściwość na ciąg reprezentujący klasę pochodzącą z DataProtector klasy. Ten ciąg odpowiada parametrowi providerClass przekazanemu do metody fabryki statycznej DataProtector.Create . Określona klasa jest używana przez MachineKey.Protect metody i MachineKey.Unprotect , nawet jeśli nie określisz Framework45 opcji .

Jeśli ustawisz tę właściwość, musisz również ustawić ApplicationName właściwość .

Dotyczy