PreApplicationStartCode Class
Provides a registration point for the simple membership pre-application start code.
Inheritance Hierarchy
System.Object
WebMatrix.WebData.PreApplicationStartCode
Namespace: WebMatrix.WebData
Assembly: WebMatrix.WebData (in WebMatrix.WebData.dll)
Syntax
'Declaration
Public NotInheritable Class PreApplicationStartCode
'Usage
public static class PreApplicationStartCode
public ref class PreApplicationStartCode abstract sealed
[<AbstractClassAttribute>]
[<SealedAttribute>]
type PreApplicationStartCode = class end
public final class PreApplicationStartCode
The PreApplicationStartCode type exposes the following members.
Methods
Name | Description | |
---|---|---|
Start | Registers the simple membership pre-application start code. |
Top
Remarks
To use the SimpleMembershipProvider and WebSecurity classes for an ASP.NET Web Pages website, set enableSimpleMembership to true in the appSetting section of the Web.config file. (Alternatively, leave enableSimpleMembership out of the Web.config file, because enableSimpleMembership defaults to true.) When simple membership is enabled, SimpleMembershipProvider replaces SqlMembershipProvider, but is not invoked until it is initialized by a call to the InitializeDatabaseConnection() method.
Before InitializeDatabaseConnection() is called, SimpleMembershipProvider delegates all calls to SqlMembershipProvider. After the WebSecurity.InitializeDatabaseConnection() method is called, the SimpleMembershipProvider class is activated and provides membership services.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.