Why do my users and roles end up in Users and Roles tables and not aspnet_users and aspnet_roles?
When I use the Aspnet web site administration tool (visualstudio->menu->project->aspnet configuration to add a user it ends up in the Users table; and new roles in the Roles table.
Everything I have read on the subject says aspnet_users and aspnnet_roles.
I am using aspnetmvc4 (beta), sqlserver2008r2, visualstudio2010. I have created the aspnet_xxx-tables in the database through aspnet_regsql.exe. I sniff sqlserver and get queries against Users and Roles. It even creates an Applications table.
As per request, the membership part of web.config:
<membership defaultProvider="DefaultMembershipProvider">
<providers>
<clear />
<add connectionStringName="DefaultConnection" enablePasswordRetrieval="false"
enablePasswordReset="true" requiresQuestionAndAnswer="false"
requiresUniqueEmail="false" maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
applicationName="/"
name="DefaultMembershipProvider"
type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</providers>
</membership>
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Old school ASP.NET 2.0+ providers (System.Web.XXX.SqlXXXProvider)
–> Uses the aspnet_Users and aspnet_Roles tables, via stored procs.
The new Universal Providers (System.Web.Providers.XXX)
–> Uses the Users and Roles tables, via (EF-generated?) SQL.
More info here (from Mr Scott H):
http://www.hanselman.com/blog/IntroducingSystemWebProvidersASPNETUniversalProvidersForSessionMembershipRolesAndUserProfileOnSQLCompactAndSQLAzure.aspx
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0