I have migrated some ASP.Net 2.0 code to ASP.Net 4.5 and am having a problem with adding users and roles. The new information is going into a table dbo.Users in the aspnetdb database rather than dbo.aspnet_Users as it used to. Why is this and how do I get it to work as before? Is there a new API I should be using?
This did not work. I created my aspnetdb database using aspnet_regsql.exe and all of the tables within the database so created have their names prefixed with "aspnet_". The views created reference the tables with these names. However, when I try to execute
it creates new tables which do not have "aspnet_" at the beginning of the names. It places the new role in the dbo.Roles table and can't add the user because it is looking for dbo.aspnet_Roles (via the views which still reference dbo.aspnet_Roles).
Your help has saved me hundreds of hours of internet surfing.
fblack61
steve_webber
ASKER
It appears that the new user was added to the ado.aspnet_Users table, but the role was added to ado.Roles table and the error occurs trying to add the user to the role.
Manoj Patil
Can you specify the error.
steve_webber
ASKER
The error returned was "The user 'admin@appforms.com' was not found." I assume this is because it was looking in dbo.Users instead of dbo.aspnet_Users.
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
I determined by myself that i was using an obsolete mechanism to create the membership database. It is created automatically, with different table names, with ASP.Net 4.5.
Open in new window
with this,
Open in new window