The following sections describe attributes, child elements, and parent elements.
Attributes
|
Attribute
|
Description
|
| decryption | Optional String attribute. Specifies the type of hashing algorithm that is used for decrypting data. This attribute can have one of the following values.
|
Value
|
Description
| | Auto | Specifies that ASP.NET determines which decryption algorithm to use, based on configuration settings. This is the default machineKey decryption value. | | AES | Specifies that ASP.NET uses the AES (Rijndael) algorithm to decrypt data. AES is the default algorithm to decrypt data. | | 3DES | Specifies that ASP.NET uses the TripleDES algorithm to decrypt data. The TripleDES (3DES) algorithm uses three successive iterations of the DES algorithm. | | DES | Specifies that ASP.NET uses the Data Encryption Standard (DES) algorithm to decrypt data. |
Note |
|---|
| This attribute is new in the .NET Framework version 2.0. |
|
| decryptionKey | Required String attribute. Specifies the key that is used to encrypt and decrypt data or the process by which the key is generated. This attribute is used for forms authentication encryption and decryption, and for view-state encryption when validation is set to the TripleDES field. The IsolateApps modifier of the decryptionKey value indicates that ASP.NET generates a unique encrypted key for each application, using the application's ID. IsolateApps is included as part of the default value. If you need to support configuration across a network of Web servers (a Web farm), set this attribute manually to ensure consistent configuration. This attribute can have one of the following values. The default is AutoGenerate,IsolateApps.
|
Value
|
Description
| | AutoGenerate, IsolateApps | The AutoGenerate modifier specifies that ASP.NET generates a random key and stores it in the Local Security Authority LSA. The IsolateApps modifier specifies that ASP.NET generates a unique encrypted key for each application using the application ID of each application. This is the default value. | | value | Specifies a manually assigned key. This value must be manually set to a string of hexadecimal characters to ensure consistent configuration across a Web farm. The key should be 16 hexadecimal characters in length when using DES encryption and 48 hexadecimal characters in length when using Triple DES (3DES) or AES encryption. If keys shorter than the maximum length are used, the keys should be created by a truly random means, such as by using the RNGCryptoServiceProvider class. ASP.NET can use Triple DES only on computers on which 128-bit encryption is available. |
|
| validation | Required MachineKeyValidation attribute. Specifies the type of encryption that is used to validate data. This attribute can have one of the following values. The default is SHA1.
|
Value
|
Description
| | AES | Specifies that ASP.NET uses the AES (Rijndael) algorithm to validate data. | | MD5 | Specifies that ASP.NET uses the Message Digest 5 (MD5) hash algorithm to validate data. This algorithm produces better performance than SHA1. | | SHA1 | Specifies that ASP.NET uses the SHA1 hash algorithm to validate data. Use this algorithm for increased security. This is the default value. | | 3DES | Specifies that ASP.NET uses the TripleDES algorithm to validate data. The TripleDES algorithm uses three successive iterations of the DES algorithm. |
|
| validationKey | Required String attribute. Specifies the key used to validate encrypted data. validationKey is used when enableViewStateMAC is true in order to create a message authentication code (MAC) to ensure that view state has not been tampered with. validationKey is also used to generate out-of-process, application-specific session IDs to ensure that session state variables are isolated between sessions. The IsolateApps modifier of the validationKey value indicates that ASP.NET generates a unique encrypted key for each application, using the application's ID. IsolateApps is included as part of the default value. If you need to support configuration across a network of Web servers (a Web farm), set the validationKey attribute manually to ensure consistent configuration. This attribute can have one of the following values. The default is "AutoGenerate,IsolateApps".
|
Value
|
Description
| | AutoGenerate, IsolateApps | The AutoGenerate modifier specifies that ASP.NET generates a random key and stores it in the Local Security Authority (LSA). The IsolateApps modifier specifies that ASP.NET generates a unique encrypted key for each application using the application's ID. This is the default value. | | value | Specifies a manually assigned key. This value must be set to a string of hexadecimal characters to ensure consistent configuration across a Web farm. The key should be 16 hexadecimal characters in length when using DES encryption or 48 hexadecimal characters in length when using Triple DES (3DES) or AES encryption. If keys shorter than the maximum length are used, the keys should be created by a truly random means, such as by using RNGCryptoServiceProvider class. ASP.NET can use Triple DES only on computers on which 128-bit encryption is available. |
|
Child Elements
None.
Parent Elements
|
Element
|
Description
|
| configuration | Specifies the required root element in every configuration file that is used by the common language runtime and in .NET Framework applications. |
| system.web | Specifies the root element for the ASP.NET configuration settings in a configuration file and contains configuration elements that configure ASP.NET Web applications and control how applications behave. |