System.Web
2.0.0.0
System.Configuration.ConfigurationSection
The class provides a way to programmatically access and modify the content of the MachineKey section in the configuration file. The MachineKey section can be configured at the machine (Machine.config) or application (Web.config) level and controls the keys and algorithms that are used for Windows Forms authentication, view-state validation, and session-state application isolation. For any of these features to work across a network of Web servers (a Web farm), the DecryptionKey and ValidationKey attributes of the MachineKey section must be configured explicitly and identically with valid key values. The AutoGenerate value does not work for Web farms, because it relies on a cryptographically random secret, which is persisted using machine-local protection and will not be the same across more than one computer.
Defines the configuration settings that control the key generation and algorithms that are used in encryption, decryption, and message authentication code (MAC) operations in Windows Forms authentication, view-state validation, and session-state application isolation. This class cannot be inherited.
Constructor
The constructor is not intended to be used directly from your code. It is called by the ASP.NET configuration system. You obtain an instance of the class by using the method.
Initializes a new instance of the class by using default settings.
2.0.0.0
Property
System.Configuration.ConfigurationProperty("decryption", DefaultValue="Auto")
System.Configuration.StringValidator(MinLength=1)
System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))
System.String
To be added.
The 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 algorithm to encrypt data. AES is the default algorithm to encrypt data.
-
3DES, which specifies that ASP.NET uses the algorithm to encrypt data.
-
A custom algorithm.
This property is typically set declaratively in the decryption attribute of the machineKey element of the Web.config file. For more information, see the machineKey element.
Specifies the encryption algorithm that is used for encrypting and decrypting forms authentication data.
2.0.0.0
Property
System.Configuration.ConfigurationProperty("decryptionKey", DefaultValue="AutoGenerate,IsolateApps")
System.Configuration.StringValidator(MinLength=1)
System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))
System.String
To be added.
The property is used for encryption and decryption, such as in Windows Forms authentication, and for view state when the property is set to "3DES" or "AES".
Use the "AutoGenerate" option to specify that ASP.NET generates a random key and stores it in the Local Security Authority. The "AutoGenerate" option is part of the default value.
If you add the "IsolateApps" modifier to the "AutoGenerate" value, ASP.NET generates a unique encrypted key for each application by using each application's . This is the default setting.
If you add the "IsolateByAppId" modifier to the "AutoGenerate" value, ASP.NET generates a unique encrypted key for each application by using each application's . If two distinct applications share a virtual path (perhaps because those applications are running on different ports), this flag can be used to further distinguish them from one another. The “IsolateByAppId” flag is understood only by ASP.NET 4.5, but it can be used regardless of the setting.
If you need to support configuration across a network of Web servers (a Web farm), set the property manually to ensure consistent configuration. For information about how to manually generate values for the DecryptionKey attribute, see How To: Configure MachineKey in ASP.NET 2.0.
This property is typically set declaratively in the DecryptionKey attribute of the machineKey element of the Web.config file. For more information, see the machineKey element.
Gets or sets the key that is used to encrypt and decrypt data, or the process by which the key is generated.
2.0.0.0
Property
System.Configuration.ConfigurationPropertyCollection
To be added.
To be added.
To be added.
2.0.0.0
Method
System.Void
To be added.
To be added.
To be added.
2.0.0.0
Property
System.Configuration.ConfigurationProperty("validation", DefaultValue="SHA1")
System.ComponentModel.TypeConverter(typeof(System.Web.Configuration.MachineKeyValidationConverter))
System.Web.Configuration.MachineKeyValidation
To be added.
The property supports encryption algorithms that are defined by the enumeration. This property is typically set declaratively in the decryption attribute of the machineKey element of the Web.config file. For more information, see the machineKey element.
Specifies the hashing algorithm that is used for validating forms authentication and view state data.
2.0.0.0
Property
System.Configuration.ConfigurationProperty("validationKey", DefaultValue="AutoGenerate,IsolateApps")
System.Configuration.StringValidator(MinLength=1)
System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))
System.String
To be added.
The property is used when enableViewStateMAC is true to create a message authentication code (MAC) to enable ASP.NET to determine whether view state has been tampered with. The property is also used to generate out-of-process, application-specific session IDs to ensure that session state variables are isolated between applications.
Use the "AutoGenerate" option to specify that ASP.NET generates a random key and stores it in the Local Security Authority. The "AutoGenerate" option is part of the default value.
If you add the "IsolateApps" modifier to the "AutoGenerate" value, ASP.NET generates a unique encrypted key for each application by using each application's . This is the default setting.
If you add the "IsolateByAppId" modifier to the "AutoGenerate" value, ASP.NET generates a unique encrypted key for each application by using each application's . If two distinct applications share a virtual path (perhaps because those applications are running on different ports), this flag can be used to further distinguish them from one another. The “IsolateByAppId” flag is understood only by ASP.NET 4.5, but it can be used regardless of the setting.
If you need to support configuration across a network of Web servers (a Web farm), set the property manually to ensure consistent configuration. For information about how to manually generate values for the DecryptionKey attribute, see How To: Configure MachineKey in ASP.NET 2.0.
This property is typically set declaratively in the validationKey attribute of the machineKey element of the Web.config file.
Gets or sets the key that is used to validate forms authentication and view state data, or the process by which the key is generated.
2.0.0.0