This documentation is archived and is not being maintained.

ClientRoleProvider.Initialize Method

Initializes the provider.

Namespace:  System.Web.ClientServices.Providers
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

public override void Initialize(
	string name,
	NameValueCollection config


Type: System.String

The friendly name of the provider.

Type: System.Collections.Specialized.NameValueCollection

A collection of name/value pairs representing the provider-specific attributes specified in the configuration for this provider.


name is null.


config is null.


name is empty.


config contains an unrecognized value. For more information, see the Remarks section.


This ClientRoleProvider has already been initialized.


config contains a cacheTimeout value that is not in the correct format for conversion to an Int32 value.


config contains a cacheTimeout value that represents a number less than MinValue or greater than MaxValue.

The ASP.NET extensibility model calls the Initialize method to initialize the ClientRoleProvider using information in your application configuration file. This method recognizes the following role service configuration attributes:

  • name

  • description

  • cacheTimeout

  • connectionStringName

  • serviceUri

  • honorCookieExpiry

For more information about these attributes, see How to: Configure Client Application Services.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5