문제

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