WebSecurity.InitializeDatabaseConnection WebSecurity.InitializeDatabaseConnection WebSecurity.InitializeDatabaseConnection Method

Definition

Overloads

InitializeDatabaseConnection(String, String, String, String, Boolean) InitializeDatabaseConnection(String, String, String, String, Boolean) InitializeDatabaseConnection(String, String, String, String, Boolean)

Initializes the membership system by connecting to a database that contains user information and optionally creates membership tables if they do not already exist.

InitializeDatabaseConnection(String, String, String, String, Boolean, SimpleMembershipProviderCasingBehavior) InitializeDatabaseConnection(String, String, String, String, Boolean, SimpleMembershipProviderCasingBehavior) InitializeDatabaseConnection(String, String, String, String, Boolean, SimpleMembershipProviderCasingBehavior)
InitializeDatabaseConnection(String, String, String, String, String, Boolean) InitializeDatabaseConnection(String, String, String, String, String, Boolean) InitializeDatabaseConnection(String, String, String, String, String, Boolean)

Initializes the membership system by connecting to a database that contains user information by using the specified membership or role provider, and optionally creates membership tables if they do not already exist.

InitializeDatabaseConnection(String, String, String, String, String, Boolean, SimpleMembershipProviderCasingBehavior) InitializeDatabaseConnection(String, String, String, String, String, Boolean, SimpleMembershipProviderCasingBehavior) InitializeDatabaseConnection(String, String, String, String, String, Boolean, SimpleMembershipProviderCasingBehavior)

InitializeDatabaseConnection(String, String, String, String, Boolean) InitializeDatabaseConnection(String, String, String, String, Boolean) InitializeDatabaseConnection(String, String, String, String, Boolean)

Initializes the membership system by connecting to a database that contains user information and optionally creates membership tables if they do not already exist.

public static void InitializeDatabaseConnection (string connectionStringName, string userTableName, string userIdColumn, string userNameColumn, bool autoCreateTables);
static member InitializeDatabaseConnection : string * string * string * string * bool -> unit
Public Shared Sub InitializeDatabaseConnection (connectionStringName As String, userTableName As String, userIdColumn As String, userNameColumn As String, autoCreateTables As Boolean)
Parameters
connectionStringName
String String String

The name of the connection string for the database that contains user information. If you are using SQL Server Compact, this can be the name of the database file (.sdf file) without the .sdf file name extension.

userTableName
String String String

The name of the database table that contains the user profile information.

userIdColumn
String String String

The name of the database column that contains user IDs. This column must be typed as an integer (int).

userNameColumn
String String String

The name of the database column that contains user names. This column is used to match user profile data to membership account data.

autoCreateTables
Boolean Boolean Boolean

true to indicate that user profile and membership tables should be created if they do not exist; false to indicate that tables should not be created automatically. Although the membership tables can be created automatically, the database itself must already exist.

InitializeDatabaseConnection(String, String, String, String, Boolean, SimpleMembershipProviderCasingBehavior) InitializeDatabaseConnection(String, String, String, String, Boolean, SimpleMembershipProviderCasingBehavior) InitializeDatabaseConnection(String, String, String, String, Boolean, SimpleMembershipProviderCasingBehavior)

public static void InitializeDatabaseConnection (string connectionStringName, string userTableName, string userIdColumn, string userNameColumn, bool autoCreateTables, WebMatrix.WebData.SimpleMembershipProviderCasingBehavior casingBehavior);
static member InitializeDatabaseConnection : string * string * string * string * bool * WebMatrix.WebData.SimpleMembershipProviderCasingBehavior -> unit
Public Shared Sub InitializeDatabaseConnection (connectionStringName As String, userTableName As String, userIdColumn As String, userNameColumn As String, autoCreateTables As Boolean, casingBehavior As SimpleMembershipProviderCasingBehavior)
Parameters
connectionStringName
String String String
userTableName
String String String
userIdColumn
String String String
userNameColumn
String String String
autoCreateTables
Boolean Boolean Boolean

InitializeDatabaseConnection(String, String, String, String, String, Boolean) InitializeDatabaseConnection(String, String, String, String, String, Boolean) InitializeDatabaseConnection(String, String, String, String, String, Boolean)

Initializes the membership system by connecting to a database that contains user information by using the specified membership or role provider, and optionally creates membership tables if they do not already exist.

public static void InitializeDatabaseConnection (string connectionString, string providerName, string userTableName, string userIdColumn, string userNameColumn, bool autoCreateTables);
static member InitializeDatabaseConnection : string * string * string * string * string * bool -> unit
Public Shared Sub InitializeDatabaseConnection (connectionString As String, providerName As String, userTableName As String, userIdColumn As String, userNameColumn As String, autoCreateTables As Boolean)
Parameters
connectionString
String String String

The name of the connection string for the database that contains user information. If you are using SQL Server Compact, this can be the name of the database file (.sdf file) without the .sdf file name extension.

providerName
String String String

The name of the ADO.NET data provider. If you want to use Microsoft SQL Server, the InitializeDatabaseConnection(String, String, String, String, Boolean) overload is recommended.

userTableName
String String String

The name of the database table that contains the user profile information.

userIdColumn
String String String

The name of the database column that contains user IDs. This column must be typed as an integer (int).

userNameColumn
String String String

The name of the database column that contains user names. This column is used to match user profile data to membership account data.

autoCreateTables
Boolean Boolean Boolean

true to indicate that user profile and membership tables should be created automatically; false to indicate that tables should not be created automatically. Although the membership tables can be created automatically, the database itself must already exist.

InitializeDatabaseConnection(String, String, String, String, String, Boolean, SimpleMembershipProviderCasingBehavior) InitializeDatabaseConnection(String, String, String, String, String, Boolean, SimpleMembershipProviderCasingBehavior) InitializeDatabaseConnection(String, String, String, String, String, Boolean, SimpleMembershipProviderCasingBehavior)

public static void InitializeDatabaseConnection (string connectionString, string providerName, string userTableName, string userIdColumn, string userNameColumn, bool autoCreateTables, WebMatrix.WebData.SimpleMembershipProviderCasingBehavior casingBehavior);
static member InitializeDatabaseConnection : string * string * string * string * string * bool * WebMatrix.WebData.SimpleMembershipProviderCasingBehavior -> unit
Public Shared Sub InitializeDatabaseConnection (connectionString As String, providerName As String, userTableName As String, userIdColumn As String, userNameColumn As String, autoCreateTables As Boolean, casingBehavior As SimpleMembershipProviderCasingBehavior)
Parameters
connectionString
String String String
providerName
String String String
userTableName
String String String
userIdColumn
String String String
userNameColumn
String String String
autoCreateTables
Boolean Boolean Boolean

Applies to