remove Element for providers for roleManager (ASP.NET Settings Schema)

Removes a reference to an inherited provider from the collection of role management providers.

configuration Element (General Settings Schema)
  system.web Element (ASP.NET Settings Schema)
    roleManager Element (ASP.NET Settings Schema)
      providers Element for roleManager (ASP.NET Settings Schema)
        remove Element for providers for roleManager (ASP.NET Settings Schema)

<remove 
   name=" provider name" 
/>

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

name

Required String attribute.

The name of the role provider instance to remove from the collection. This attribute must be the same as the name attribute of the add element that added the role provider to the collection.

Child Elements

None.

Parent Elements

Element

Description

configuration

The required root element in every configuration file used by the common language runtime and .NET Framework applications.

system.web

Specifies the root element for the ASP.NET configuration section.

roleManager

Configures an application for role management.

providers

Defines a collection of role providers for role management.

Remarks

The remove element removes a reference to an inherited provider from the collection of role management providers stored in the providers element.

The providers element defines a collection of role providers for role management.

For information about accessing and modifying configuration values for the roleManager element in application code, see the RoleManagerSection class.

Example

The following example shows an ASP.NET application configured to use the SqlRoleProvider to store and retrieve role information. The <remove> element removes the default SQL Server role provider instance before adding the new SqlRoleProvider instance.

<configuration>
  <system.web>
      <roleManager defaultProvider="SqlProvider" 
                   enabled="true"
                   cacheRolesInCookie="true"
                   cookieName=".ASPROLES"
                   cookieTimeout="30"
                   cookiePath="/"
                   cookieRequireSSL="false"
                   cookieSlidingExpiration="true"
                   cookieProtection="All" >
        <providers>
        <remove name="AspNetSqlProvider" />
          <add
            name="SqlProvider"
            type="System.Web.Security.SqlRoleProvider"
            connectionStringName="SqlServices" 
            applicationName="SampleApplication" />
            
        </providers>
      </roleManager>
  </system.web>
</configuration>

Element Information

Configuration Section Handler

RoleManagerSection

Configuration Member

Providers

Configurable Locations

Machine.config

Root level Web.config

Application level Web.config

Requirements

IIS 5.0, IIS 5.1, or IIS 6.0

.NET Framework 2.0

Visual Studio 2003, or Visual Studio 2005

See Also

Tasks

How to: Configure Specific Directories Using Location Settings

How to: Lock ASP.NET Configuration Settings

Reference

providers Element for roleManager (ASP.NET Settings Schema)

clear Element for providers for roleManager (ASP.NET Settings Schema)

add Element for providers for roleManager (ASP.NET Settings Schema)

roleManager Element (ASP.NET Settings Schema)

system.web Element (ASP.NET Settings Schema)

configuration Element (General Settings Schema)

System.Configuration

System.Web.Configuration

RoleManagerSection

RoleManager

Concepts

Understanding Role Management

Securing ASP.NET Configuration

ASP.NET Configuration Scenarios

Other Resources

General Configuration Settings (ASP.NET)

ASP.NET Configuration Settings

ASP.NET Reference

ASP.NET Web Site Administration

ASP.NET Configuration API