Documentation for this section has not yet been entered.
The Membership.Providers property references all of the membership providers enabled for an application, including providers added in the Web.config file for the application and the Machine.config file for all applications. You can control which membership providers are available for an application using the providers element of the membership section in the configuration for your application. For example, the following sample shows the membership section in the Web.config file for an application that removes the System.Web.Security.SqlMembershipProvider instance (AspNetSqlProvider) specified in the machine configuration file and adds a System.Web.Security.SqlMembershipProvider instance named SqlProvider as the default membership provider for the application.
Example
<configuration> <connectionStrings> <add name="SqlServices" connectionString="Data Source=MySqlServer;Integrated Security=SSPI;Initial Catalog=aspnetdb;" /> </connectionStrings> <system.web> <membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="20"> <providers> <remove name="AspNetSqlProvider" /> <add name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SqlServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" passwordFormat="Hashed" applicationName="/" /> </providers> </membership> </system.web> </configuration>
When specifying the membership section, you must specify the defaultProvider attribute. If you do not specify a membership section in your Web.config, the values from the machine configuration are used and the System.Web.Security.SqlMembershipProvider instance named AspNetSqlProvider is established as the defaultProvider.
You can obtain a strongly typed reference to a provider from the Membership.Providers collection by indexing the membership provider by name and casting it as the desired type.