Can I change the membership table name prefix in ASP.NET MVC 4?

I am building an ASP.NET MVC 4 website, and with the default project template, it automatically generates some tables in my membership database. For instance:

  • webpages_Membership
  • webpages_Roles

and etc.

Since I may need to use the same database for several websites, I would like to replace the prefix "webpages_" with something specific for this website, but I cannot find where this is configured. How can I change this in ASP.NET MVC 4?

+4
source share
1 answer

No, not at all. Table names are hardcoded in SimpleMembershipProvider.

You can find the source, change the names and use your version if you want. The source is here:

http://aspnetwebstack.codeplex.com/SourceControl/changeset/view/e0115a823029#src%2fWebMatrix.WebData%2fSimpleMembershipProvider.cs

+9
source

Source: https://habr.com/ru/post/1439532/


All Articles