System.Web 2.0.0.0 System.Object System.Web.IHttpModule

When the user profile is enabled, ASP.NET uses the to create the user profile and store it in the property of the current .

The exposes the following events you can handle to configure authentication in your application:

The event, to migrate profile settings from an anonymous profile to an authenticated profile when an anonymous user logs in.

The event, to customize how the user profile is created.

The event, to control how the user profile is saved when the property is set to true.

For information about enabling the user profile, see <profile> Element for <system.web>.

Manages the creation of the user profile and profile events. This class cannot be inherited.

- Constructor

  This constructor is not intended to be called from application code.

  An is created when an ASP.NET application is started. The calls the constructor to create the for the application. The is specified in the configuration for an application.

  Initializes a new instance of the class.

  2.0.0.0
- Method
  System.Void

  This method is not intended to be called from application code.

  An is created when an ASP.NET application is started. The creates and initializes the for the application and calls the method when the object is released. The is specified in the configuration for an application.

  Releases all resources used by the .

  2.0.0.0
- Method
  System.Void ``

  This method is not intended to be called from application code.

  An is created when an ASP.NET application is started. The calls the method when it creates the for the application. The is specified in the configuration for an application.

  Calls initialization code when a object is created.

  The current application. 2.0.0.0
- Event
  System.Web.Profile.ProfileMigrateEventHandler

  You can access the event of the class in the Global.asax file for your ASP.NET application by using the Profile_MigrateAnonymous global event, as shown in the example for this topic.

  You can use the event to copy profile property values from an anonymous profile to an authenticated profile when a user who has been anonymously using your application logs in.

  When an application that has the user profile enabled is started, ASP.NET creates a new class of type ProfileCommon, which inherits from the class. Strongly typed accessors are added to the ProfileCommon class for each property defined in the profile configuration section. A GetProfile method enables you to retrieve a ProfileCommon object based on a user name. You can use the GetProfile method of the current, authenticated profile to retrieve the property values of the anonymous profile. The anonymous property values can then be copied to the current profile for the authenticated user.

  Occurs when the anonymous user for a profile logs in.

  2.0.0.0
- Event
  System.Web.Profile.ProfileEventHandler

  The event is raised during the event. You can access the event of the class in the Global.asax file for your ASP.NET application using the Profile_Personalize global event as shown in the example for this topic.

  You can use the event to specify a custom user profile. If the property value specified for the event handler for the event is set to a value that is not null when the event ends, then the will use the specified value of the property as the value of the property of the current .

  Occurs before the user profile is created.

  2.0.0.0
- Event
  System.Web.Profile.ProfileAutoSaveEventHandler

  The event is raised at the end of page execution if the property is true. You can access the event of the class in the Global.asax file for your ASP.NET application using the Profile_ProfileAutoSaving global event, as shown in the example for this topic.

  The method checks the property value for each in the user profile to determine whether properties that are made up of primitive types, strings, or objects have been changed. The method cannot explicitly determine whether a custom class has changed. You can use the event to determine whether a custom object has been changed and then either to continue with the automatic save for modified objects or to cancel the automatic save if no objects have been modified.

  To cancel the automatic profile save operation, set the property to false in the event; otherwise, set the property to true.

  There may be multiple subscribers to the event. The will use the last value that the property is set to. As a result, it is recommended that you explicitly set the property in the event whether you are canceling or continuing with the automatic save, as you may need to overwrite the value set by an earlier subscriber.

  Occurs at the end of page execution if automatic profile saving is enabled.

  2.0.0.0