System.Web 2.0.0.0 System.Web.Profile.ProfileProvider

The ASP.NET profile is used to store and retrieve user settings in a data source such as a database. The user profile is accessed using the property of the current . Profile information and property values are managed using a profile provider.

The class is used by ASP.NET to store and retrieve profile settings for an ASP.NET application that is using a SQL Server database. To use a , you must first create the SQL Server database used by the . To create the database used by the , run the aspnet_regsql.exe tool, which is found in the [drive:]\WINDOWS\Microsoft.NET\Framework\ folder, and specify the -A p option. The following command demonstrates how you might use the aspnet_regsql.exe executable:

`aspnet_regsql.exe -A p`

The example above does not specify a name for the database that is created, so the default name will be used. The default database name is Aspnetdb.

The machine configuration contains a default instance named AspNetSqlProvider that connects to the SQL Server on the local machine. You can use this instance of the provider, or specify your own in the Web.config file for your ASP.NET application.

If the profile provider is configured with a connection string that uses integrated security, the process account of the ASP.NET application must have rights to connect to the SQL Server database.

Manages storage of profile information for an ASP.NET application in a SQL Server database.

- Constructor

  ASP.NET calls the constructor to create an instance of the class using the values specified in the configuration file for the application. This constructor is not intended to be used from your code.

  Creates an instance of the class.

  2.0.0.0
- Property
  System.String To be added.

  The property is used by the to associate profile information with different applications. This enables multiple applications to use the same database to store user information without running into conflicts between duplicate users. Multiple ASP.NET applications can use the same user 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 a value is not specified for the applicationName attribute in the configuration file for the Web application, then the value is used for ASP.NET applications. For non-ASP.NET applications, the default value is the value without the file extension.

  Because a single default profile provider instance is used for all of the requests served by an object, you can have multiple requests executing concurrently and attempting to set the property value. The property is not thread safe for multiple writes, and changing the property value can result in unexpected behavior for multiple users of an application. It is recommended that you avoid writing code that allows users to set the property unless you must. An example of an application where setting the property may be required is an administrative application that manages profile data for multiple applications. Such an application should be a single-user application and not a Web application.

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

  2.0.0.0
- Method
  System.Int32 `` ``

  The method is used to remove unused profile data from the data source for the application specified by the applicationName attribute in the configuration file. Use the parameter to specify whether you want only anonymous profiles, only authenticated profiles, or all profiles to be searched. Of the searched profiles, any profile with a that occurs on or before the specified parameter value is deleted.

  The database updates that are performed during the call to the method are made within a transaction. If an error is encountered, the transaction is rolled back and no updates are performed.

  Deletes user profile data for profiles in which the last activity date occurred before the specified date and time.

  The number of profiles deleted from the data source.

  One of the values, specifying whether anonymous, authenticated, or both types of profiles are deleted. A that identifies which user profiles are considered inactive. If the of a user profile occurs on or before this date and time, the profile is considered inactive. 2.0.0.0
- Method
  System.Int32 ``

  The method deletes all profile information and properties for the specified profiles from the data source for the application specified by the applicationName attribute in the configuration file. The list of profiles to delete is specified as a string array of user names. If profile properties and information exist in the data source for a user name in the parameter, they are deleted.

  The return value may differ from the length of the specified array of . This indicates that some of the profiles in the specified array of were already deleted from the data store.

  The database updates that are performed during the call to the method are made within a transaction. If an error is encountered, the transaction is rolled back and no updates are performed.

  Deletes profile properties and information from the data source for the supplied list of user names.

  The number of profiles deleted from the data source.

  A string array of user names for profiles to be deleted. 2.0.0.0
- Method
  System.Int32 ``

  The method deletes all profile information and properties for the specified profiles from the data source for the application specified by the applicationName attribute in the configuration file. The list of profiles to delete is specified using a that is passed as the parameter. A can be returned from the , , , and methods.

  The return value may differ from the value for the supplied . This indicates that some of the profiles in the specified were no longer found in the data store.

  The database updates that are performed during the call to the method are made within a transaction. If an error is encountered, the transaction is rolled back and no updates are performed.

  Deletes profile properties and information for the supplied list of profiles from the data source.

  The number of profiles deleted from the data source.

  A that contains profile information for profiles to be deleted. 2.0.0.0
- Method
  System.Web.Profile.ProfileInfoCollection `` `` `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0
- Method
  System.Web.Profile.ProfileInfoCollection `` `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0
- Method
  System.Web.Profile.ProfileInfoCollection `` `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0
- Method
  System.Web.Profile.ProfileInfoCollection `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0
- Method
  System.Int32 `` ``

  The method is used to retrieve a count of all of the unused user profiles from the data source for the application specified by the applicationName attribute in the configuration file. Use the parameter to specify whether you want only anonymous profiles, only authenticated profiles, or all profiles to be searched. Of the searched profiles, all profiles with a that occurs on or before the specified parameter value are counted.

  Gets the number of profiles in the data source where the last activity date occurred on or before the specified .

  The number of profiles in the data source for which the last activity date occurred before the specified date and time.

  One of the values, specifying whether anonymous, authenticated, or both types of profiles are returned. A that identifies which user profiles are considered inactive. If the of a user profile occurs on or before this date and time, the profile is considered inactive. 2.0.0.0
- Method
  System.Configuration.SettingsPropertyValueCollection `` ``

  The method is used by the class to retrieve profile properties for the current request that are managed by the . Property values are returned from the data source for the application specified by the applicationName attribute in the configuration file. Property values and additional property information are returned as a collection of objects.

  Retrieves profile property information and values from a SQL Server profile database.

  A containing profile property information and values.

  The that contains user profile information. A containing profile information for the properties to be retrieved. 2.0.0.0
- Method
  System.Void `` ``

  ASP.NET uses this method to initialize the with the property values specified in the ASP.NET application configuration file (Web.config). This method is not intended to be used directly from your code.

  Initializes the SQL Server profile provider with the property values specified in the ASP.NET application's configuration file. This method is not intended to be used directly from your code.

  The name of the instance to initialize. A that contains the names and values of configuration options for the profile provider. 2.0.0.0
- Method
  System.Void `` ``

  The method is used by ASP.NET profile services to update the SQL Server profile database when property values are set for the current request. Property values are set at the data source for the application specified by the applicationName attribute in the configuration file. Profile property information and values to be updated by the are specified as a collection of objects.

  Updates the SQL Server profile database with the specified property values.

  The that contains user profile information. A containing profile information and values for the properties to be updated. 2.0.0.0