MachineKeySection.Validation Property


Specifies the hashing algorithm that is used for validating forms authentication and view state data.

 property System::Web::Configuration::MachineKeyValidation Validation { System::Web::Configuration::MachineKeyValidation get(); void set(System::Web::Configuration::MachineKeyValidation value); };
[System.Configuration.ConfigurationProperty("validation", DefaultValue=Mono.Cecil.CustomAttributeArgument)]
public System.Web.Configuration.MachineKeyValidation Validation { get; set; }
member this.Validation : System.Web.Configuration.MachineKeyValidation with get, set
Public Property Validation As MachineKeyValidation

Property Value

A value that indicates the hashing algorithm that is used to validate forms authentication and view state data.



The following example demonstrates how to set the Validation property by using code. This example is part of a larger example provided for the MachineKeySection class.

// Display Validation property.
Console.WriteLine("Validation: {0}",
' Display Validation value.
Console.WriteLine("Validation: {0}", configSection.Validation)


The Validation property supports encryption algorithms that are defined by the MachineKeyValidation 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.

Applies to

See also