System.Web 2.0.0.0 System.Configuration.Provider.ProviderBase

ASP.NET role management is designed to enable you to easily use a number of different role providers for your ASP.NET applications. You can use the supplied role providers that are included with the .NET Framework, or you can implement your own provider.

When implementing a custom role provider, you are required to inherit the abstract class.

There are two primary reasons for creating a custom role provider.

You need to store role information in a data source that is not supported by the role providers included with the .NET Framework, such as a FoxPro database, an Oracle database, or other data sources.

You need to manage role information using a database schema that is different from the database schema used by the providers that ship with the .NET Framework. A common example of this would be role data that already exists in a SQL Server database for a company or Web site.

Defines the contract that ASP.NET implements to provide role-management services using custom role providers.

- Constructor

  You are not required to implement a constructor for a class that inherits the abstract class. Initialization values for a implementation are passed to the method implementation.

  Initializes a new instance of the class.

  2.0.0.0
- Method
  System.Void `` `` To be added.

  is called by the class to associate the specified users with the specified roles at the data source. Roles are added to the configured .

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

  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 .

  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 add operation in a transaction and that you roll back the transaction and throw an exception if any add operation fails.

  Adds the specified user names to the specified roles for the configured applicationName.

  A string array of user names to be added to the specified roles. 2.0.0.0
- Property
  System.String To be added.

  The is used by the class to associate users and roles with different applications. This enables multiple applications to use the same database to store user and role information without running into conflicts between duplicate user names or role names. Multiple ASP.NET applications can use the same database by specifying the same value in the property. The property can be set programmatically, or it can be set declaratively in the configuration file for the Web application using the applicationName attribute.

  If no property is specified, we recommend that the property value be used.

  Gets or sets the name of the application to store and retrieve role information for.

  2.0.0.0
- Method
  System.Void `` To be added.

  is called by the method of the class to add the specified role to the data source for the configured .

  If the specified role name already exists for the configured applicationName, is null, or is an empty string, we recommend that your provider throw an exception.

  If the specified role name contains a comma, we recommend that your provider throw an exception.

  If your data source restricts the length of the role name, for example, through a fixed-length column of a table in a database, we recommend that you throw an exception if the role name exceeds the maximum length allowed by the data source.

  Adds a new role to the data source for the configured applicationName.

  2.0.0.0
- Method
  System.Boolean `` `` To be added.

  is called by the and the methods of the class to delete the specified role from the data source for the configured .

  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.

  If is true, and the role identified by the parameter has one or more members, throw a and do not delete the role. If is false, then delete the role whether it is empty or not.

  If the specified role name does not exist, is null, or is an empty string, we recommend that your provider throw an exception.

  Removes a role from the data source for the configured applicationName.

  true if the role was successfully deleted; otherwise, false.

  If true, throw an exception if has one or more members and do not delete . 2.0.0.0
- Method
  System.String[] `` ``

  The method is called by the class and returns a list of users in a role where the user name contains a match of the supplied for the configured applicationName. Wildcard support is included based on the data source. Users are returned in alphabetical order by user name.

  We recommend that you throw a if does not exist in the data source.

  Gets an array of user names in a role where the user name contains the specified user name to match.

  A string array containing the names of all the users where the user name matches and the user is a member of the specified role.

  The role to search in. The user name to search for. 2.0.0.0
- Method
  System.String[]

  is called by the method of the class to retrieve a list of role names from the data source. Only the roles for the specified are retrieved.

  If no roles exist for the configured applicationName, we recommend that your provider return a string array with no elements.

  Gets a list of all the roles for the configured applicationName.

  A string array containing the names of all the roles stored in the data source for the configured applicationName.

  2.0.0.0
- Method
  System.String[] ``

  is called by the method of the class to retrieve the role names that the specified user is associated with from the data source. Only the roles for the configured are retrieved.

  If no roles exist for the specified user for the configured applicationName, we recommend that your provider return a string array with no elements.

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

  Gets a list of the roles that a specified user is in for the configured applicationName.

  A string array containing the names of all the roles that the specified user is in for the configured applicationName.

  The user to return a list of roles for. 2.0.0.0
- Method
  System.String[] `` To be added.

  is called by the method of the class to retrieve the user names associated with a role from the data source. Only the roles for the configured are retrieved.

  If the specified role name does not exist for the configured applicationName or if it is null or an empty string, we recommend that your provider throw an exception.

  If no users are associated with the specified role for the configured applicationName, we recommend that your provider return a string array with no elements.

  Gets a list of users in the specified role for the configured applicationName.

  A string array containing the names of all the users who are members of the specified role for the configured applicationName.

  2.0.0.0
- Method
  System.Boolean `` `` To be added.

  The method is called by the method of the class to determine whether the current logged-on user is associated with a role from the data source for the configured .

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

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

  Gets a value indicating whether the specified user is in the specified role for the configured applicationName.

  true if the specified user is in the specified role for the configured applicationName; otherwise, false.

  The user name to search for. 2.0.0.0
- Method
  System.Void `` `` To be added.

  is called by , , , and methods of the class to remove the specified users from the specified roles at the data source. Only roles for the configured are modified.

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

  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 .

  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.

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

  A string array of user names to be removed from the specified roles. 2.0.0.0
- Method
  System.Boolean `` To be added.

  is called by the method of the class to determine whether a role name exists in the data source for the configured .

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

  Gets a value indicating whether the specified role name already exists in the role data source for the configured applicationName.

  true if the role name already exists in the data source for the configured applicationName; otherwise, false.

  2.0.0.0