System.Web.Configuration.FormsAuthenticationCredentials Class

Configures user credentials for ASP.NET applications that use form-based authentication.

See Also: FormsAuthenticationCredentials Members


public sealed class FormsAuthenticationCredentials : System.Configuration.ConfigurationElement


The System.Web.Configuration.FormsAuthenticationCredentials class provides a way to programmatically access and modify the credentials element of a forms section in the authentication section of the configuration file. This type is part of a group that includes the System.Web.Configuration.FormsAuthenticationConfiguration, the System.Web.Configuration.FormsAuthenticationUserCollection, and the System.Web.Configuration.FormsAuthenticationUser types. With the exception of the collection type, all the others directly affect the underlying configuration tags.


The System.Web.Configuration.FormsAuthenticationCredentials can write information into the related section of the configuration file according to the restrictions defined by System.Configuration.ConfigurationAllowDefinition.MachineToApplication. Any attempt to write in a configuration file at a level not allowed in the hierarchy will result in an error message generated by the parser. However, you can use this class to read configuration information at any level in the hierarchy. For safety and scalability, it is recommended that you use an external repository, such as a database, to keep the users' credentials.


Namespace: System.Web.Configuration
Assembly: System.Web (in System.Web.dll)
Assembly Versions:
Since: .NET 2.0