
<machineKey> | 451
web.config
Reference
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Example
The example turns on impersonation for the logged-in user authenticated by IIS:
<configuration>
<system.web>
<identity
impersonate="true"
userName="" />
</system.web>
</configuration>
Notes
Because the password attribute stores passwords in readable text, you should care-
fully consider whether it makes sense to use this functionality. Storing sensitive
information, such as passwords, in text files presents a potential security risk.
Recently, Microsoft has made a fix available for ASP.NET that will allow
encrypted credentials for this element to be stored in the system registry for a
higher level of security. You can find out more about this fix, as well as a utility
for encrypting credentials, at the following URLs:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;329250
http://support.microsoft.com/default.aspx?scid=kb;en-us;329290
<machineKey>
<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
autoge- ...