System.Web.Security.RoleProvider.RemoveUsersFromRoles Method

Removes the specified user names from the specified roles for the configured applicationName.

Syntax

public abstract void RemoveUsersFromRoles (string[] usernames, string[] rolenames)

Parameters

rolenames
Documentation for this section has not yet been entered.
usernames
A string array of user names to be removed from the specified roles.

Remarks

RoleProvider.RemoveUsersFromRoles(String[], String[]) is called by Roles.RemoveUserFromRole(string, string) , Roles.RemoveUsersFromRole(String[], string) , Roles.RemoveUserFromRoles(string, String[]) , and Roles.RemoveUsersFromRoles(String[], String[]) methods of the System.Web.Security.Roles class to remove the specified users from the specified roles at the data source. Only roles for the configured RoleProvider.ApplicationName are modified.

If any of the specified role names are not found for the configured applicationName, we recommend that your provider throw a System.Configuration.Provider.ProviderException.

If any of the specified user names are not associated with any of the specified role names for the configured applicationName, we recommend that your provider throw a System.Configuration.Provider.ProviderException.

If any of the specified user names is null or is an empty string, we recommend that your provider throw an exception.

If any of the specified role names is null or is an empty string, we recommend that your provider throw an exception.

If your data source supports transactions, we recommend that you include each remove operation in a transaction and that you roll back the transaction and throw an exception if any remove operation fails.

Requirements

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