Вопрос

I am aware of old membership and familiar with aspnet_regsql.exe concept. Now I'm using asp.net MVC4.0 (Visual Studio 2013). How do I get new simple membership table of MVC 4.0 in SQL server management studio.

Это было полезно?

Решение

The tables are created automatically the first time you try to register a user.
so if you want to access those table via SQL server,you need create one database in sql server and replace default connection string in web.config with (new database) connection string. so now membership table will created in your new database

See this link.

Другие советы

if I understand you correctly, you need to using InitializeSimpleMembershipAttribute where most interest is the following code

WebSecurity.InitializeDatabaseConnection("EFDBContext", "UsersTable", "UserId", "Login", autoCreateTables: true);

Where: - EFDBContext (connection string name)

after which all the necessary tables will Create, in particular

webpages_Membership

webpages_Roles

webpages_UsersInRoles

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top