Export (0) Print
Expand All

PreApplicationStartCode Class

Provides a registration point for the simple membership pre-application start code.

System.Object
  WebMatrix.WebData.PreApplicationStartCode

Namespace:  WebMatrix.WebData
Assembly:  WebMatrix.WebData (in WebMatrix.WebData.dll)

public static class PreApplicationStartCode

The PreApplicationStartCode type exposes the following members.

  NameDescription
Public methodStatic memberStartRegisters the simple membership pre-application start code.
Top

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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft