Name
<machineKey>
Synopsis
<machineKey validationKey="autogenerate|value” decryptionKey="autogenerate|value” validation="SHA1|MD5|3DES” />
Specifies the settings for cryptographic keys used for validation and decryption of Forms Authentication cookies.
Scope
All
Attributes
-
validationKey
The key used for validation of forms authentication cookie data, MAC checking of ViewState, and session state cookies. The default is
autogenerate
, which generates and stores a random key. For web farm implementations, you can set this value to the same 40 to 128-character key value on each server to ensure that all servers can validate successfully.-
decryptionKey
The key used for decryption of forms authentication cookie data. The default is
autogenerate
, which generates and stores a random key. For web farm implementations, you can set this value to the same 40 to 128-character key value on each server to ensure that all servers can validate successfully.-
validation
Specifies the type of encryption used for data validation.
Child Elements
None
Notes
For web farms, ensuring that the validationKey
and
decryptionKey
values are synchronized across all
servers in the farm is important. If they are not synchronized, you
may get errors in Forms Authentication, ViewState errors, or problems
with session state.
Get ASP.NET in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.