| |||||||||||||||||||||||||||||||
<authentication> forms credentials ElementASP.NET Syntax ASP.NET Configuration Sections Allows optional definitions of name and password credentials within the configuration file. You also can implement a custom password scheme to use an external source, such as a database, to control validation.
<credentials passwordFormat="[ Clear | SHA1 | MD5 ]"> <clear /> <remove /> <user /> </credentials> Attributes and ElementsThe following sections describe attributes, child elements, and parent elements. Attributes
Child Elements
Parent Elements
RemarksThe credentials element allows optional definitions of name and password credentials within the configuration file. You also can implement a custom password scheme to use an external source, such as a database, to control validation. If multiple applications are running on a single server, the attributes of the forms element must be configured in the Web.config file for each application. For more information, see Forms Authentication Across Applications. Default ConfigurationThe following default credentials element is not explicitly configured in the Machine.config or root Web.config file. However, it is the default configuration that is returned by the application. <credentials passwordFormat="SHA1" /> ExampleThe following code example demonstrates how to specify the authentication mode, logon page, and logon credentials encryption format. Credentials for three user accounts are stored in the configuration file. <configuration>
<system.web>
<authentication mode="Forms">
<forms name="401kApp" loginUrl="/login.aspx">
<credentials passwordFormat = "SHA1">
<user name="UserName1"
password="SHA1EncryptedPassword1" />
<user name="UserName2"
password="SHA1EncryptedPassword2" />
<user name="UserName3"
password="SHA1EncryptedPassword3" />
</credentials>
</forms>
</authentication>
</system.web>
</configuration>
See AlsoASP.NET Authentication <authentication> Section <authentication> forms Element |
| ||||||||||||||||||||||||||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note