質問

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