public ref class FormsAuthenticationUserCollection sealed : System::Configuration::ConfigurationElementCollection
[System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.FormsAuthenticationUser), AddItemName="user", CollectionType=System.Configuration.ConfigurationElementCollectionType.BasicMap)]
public sealed class FormsAuthenticationUserCollection : System.Configuration.ConfigurationElementCollection
[<System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.FormsAuthenticationUser), AddItemName="user", CollectionType=System.Configuration.ConfigurationElementCollectionType.BasicMap)>]
type FormsAuthenticationUserCollection = class
inherit ConfigurationElementCollection
Public NotInheritable Class FormsAuthenticationUserCollection
Inherits ConfigurationElementCollection
// Get the Web application configuration.
System.Configuration.Configuration configuration =
WebConfigurationManager.OpenWebConfiguration("/aspnetTest");
// Get the authentication section.
AuthenticationSection authenticationSection =
(AuthenticationSection)configuration.GetSection(
"system.web/authentication");
// Get the forms credentials collection .
FormsAuthenticationCredentials formsAuthenticationCredentials =
authenticationSection.Forms.Credentials;
' Get the Web application configuration.
Dim configuration As System.Configuration.Configuration = _
WebConfigurationManager.OpenWebConfiguration( _
"/aspnetTest")
' Get the authentication section.
Dim authenticationSection _
As AuthenticationSection = _
CType(configuration.GetSection( _
"system.web/authentication"), AuthenticationSection)
' Get the forms credentials collection .
Dim formsAuthenticationCredentials _
As FormsAuthenticationCredentials = _
authenticationSection.Forms.Credentials