MachineKeySection.Decryption Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Specifies the encryption algorithm that is used for encrypting and decrypting forms authentication data.

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

[ConfigurationPropertyAttribute("decryption", DefaultValue = "Auto")]
[StringValidatorAttribute(MinLength = 1)]
public string Decryption { get; set; }

Property Value

Type: System.String

A value that indicates the algorithm that is used to encrypt and decrypt forms authentication data. (For information about how to specify the algorithm that is used when view state is encrypted, see the Validation property.) Auto is the default value.

Exception Condition

The selected value is not one of the decryption values.

The Decryption property supports the following decryption values:

  • Auto, which is the default value, specifies that ASP.NET determines which encryption algorithm to use based on configuration default settings.

  • AES, which specifies that ASP.NET uses the AES algorithm to encrypt data. AES is the default algorithm to encrypt data.

  • 3DES, which specifies that ASP.NET uses the TripleDES algorithm to encrypt data.

  • A custom algorithm.

This property is typically set declaratively in the decryption attribute of the element of the Web.config file. For more information, see the element.

.NET Framework
Available since 2.0
Return to top