Member | Description |
|---|
ApplicationName property | The name of the application using the role information specified in the configuration file (Web.config). The ApplicationName is stored in the data source with related user information and used when querying for user information. See the section on the ApplicationName later in this topic for more information. This property is read-write and defaults to the ApplicationPath if not specified explicitly. |
AddUsersToRoles method | Takes as input a list of user names and a list of role names, and associates the specified users with the specified roles at the data source for the configured ApplicationName. You should throw a ProviderException if any of the role names or user names specified do not exist for the configured ApplicationName. You should throw an ArgumentException if any of the specified user names or role names is an empty string and an ArgumentNullException if any of the specified user names or role names is null (Nothing in Visual Basic). If your data source supports transactions, you should include each add operation in a transaction and roll back the transaction and throw an exception if any add operation fails. |
CreateRole method | Takes as input the name of a role and adds the specified role to the data source for the configured ApplicationName. You should throw a ProviderException if the specified role name already exists for the configured ApplicationName. You should throw an ArgumentException if the specified role name is an empty string, contains a comma, or exceeds the maximum length allowed by the data source, and an ArgumentNullException if the specified role name is null (Nothing in Visual Basic). |
DeleteRole method | Takes as input the name of a role and a Boolean value that indicates whether to throw an exception if there are still users associated with the role. The DeleteRole deletes the specified role from the data source for the configured ApplicationName. If the throwOnPopulatedRole parameter is true, and the role identified by the role name parameter has one or more members, throw a ProviderException and do not delete the role. If the throwOnPopulatedRole parameter is false, then delete the role whether it is empty or not. When you delete a role from the data source, ensure that you also delete any associations between a user name and the deleted role for the configured ApplicationName. You should throw an ArgumentException if the specified role name does not exist, or is an empty string. You should throw an ArgumentNullException if the specified role name is null (Nothing in Visual Basic). |
FindUsersInRole method | Takes a role name and a string value and returns a collection of user names in the role that contain the provided string value. Wildcard support is included based on the data source. Users are returned in alphabetical order by user name. It is recommended that you throw a ProviderException if the role name specified does not exist in the data source. |
GetAllRoles method | Returns a list of role names from the data source. Only the roles for the specified ApplicationName are retrieved. If no roles exist for the configured ApplicationName, you should return a string array with no elements. |
GetRolesForUser method | Takes as input a user name and returns the role names that the specified user is associated with, from the data source. Only the roles for the configured ApplicationName are retrieved. If no roles exist for the specified user for the configured ApplicationName, you should return a string array with no elements. You should throw an ArgumentException if the specified user name is an empty string. You should throw an ArgumentNullException if the specified user name is null (Nothing in Visual Basic). |
GetUsersInRole method | Takes as input a role name and returns the user names associated with a role from the data source. Only the roles for the configured ApplicationName are retrieved. If the specified role name does not exist for the configured ApplicationName, you should throw a ProviderException. If no users are associated with the specified role for the configured ApplicationName, you should return a string array with no elements. You should throw an ArgumentException if the specified role name is an empty string, contains a comma, or exceeds the maximum length for a role name allowed by your data source. You should throw an ArgumentNullException if the specified role name is null (Nothing in Visual Basic). |
IsUserInRole method | Takes as input a user name and a role name and determines whether the specified user is associated with a role from the data source for the configured ApplicationName. You should throw a ProviderException if the role name or user name specified does not exist for the configured ApplicationName. You should throw an ArgumentException if the specified user name or role name is an empty string and an ArgumentNullException if the specified user name or role name is null (Nothing in Visual Basic). |
RemoveUsersFromRoles method | Takes as input a list of user names and a list of role names and removes the association for the specified users from the specified roles at the data source for the configured ApplicationName. You should throw a ProviderException if any of the role names or user names specified does not exist for the configured ApplicationName. You should throw an ArgumentException if any of the specified user names or role names is an empty string and an ArgumentNullException if any of the specified user names or role names is null (Nothing in Visual Basic). If your data source supports transactions, you should include each remove operation in a transaction and roll back the transaction and throw an exception if any remove operation fails. |
RoleExists method | Takes as input a role name and determines whether the role name exists in the data source for the configured ApplicationName. You should throw an ArgumentException if the specified role name is an empty string. It is recommended that you throw an ArgumentNullException if the specified role name is null (Nothing in Visual Basic). |