private static MySqlSimpleMembershipProvider CreateDefaultExtendedMembershipProvider(string name, MembershipProvider currentDefault) { var membership = new MySqlSimpleMembershipProvider(currentDefault); var config = new NameValueCollection(); membership.Initialize(name, config); return(membership); }
public SimpleMembership() { _simpleProvider = new MySqlSimpleMembershipProvider(); _simpleRoleProvider = new MySqlSimpleRoleProvider(); var _config = new NameValueCollection(); _config.Add("connectionStringName", "LocalMySqlServer"); _config.Add("userTableName", "UserProfile"); _config.Add("userIdColumn", "UserId"); _config.Add("userNameColumn", "UserName"); _simpleProvider.Initialize("Test", _config); _simpleRoleProvider.Initialize("TestRoleProvider", _config); MySqlWebSecurity.InitializeDatabaseConnection(ConnectionString, "MySqlSimpleMembership", _userTable, _userIdColumn, _userNameColumn, true, true); }