Is there any way to prefix the new .NET 4.5 DefaultMembershipProvider table names in the database? They used to be named aspnet_Users, aspnet_Roles etc. and they are now named just Users, Roles, etc. which is conflicting with my application schema that has a table User.
Is my only option to use a separate database for membership if I want to use the new universal providers and avoid this naming issue?
Web. Security namespace includes a class named MembershipUser that defines the basic attributes of a membership user and that a membership provider uses to represent individual users.
The ASP.NET membership provider is a feature that enables ASP.NET developers to create Web sites that allow users to create unique user name and password combinations. With this facility, any user can establish an account with the site, and sign in for exclusive access to the site and its services.
The membership element is a sub-element of the system. web section. You can enable ASP.NET Membership for an application by directly editing the Web. config file for that application, or you can use the Web Site Administration Tool, which provides a wizard-based interface.
Unfortunately there is no way to customize the table names for the Universal Providers currently, I'll make sure we consider adding support for this in the future.
It may be possible to have DefaultMembershipProvider use tables under a different schema by having it connect to SQL with a login which maps to a non-default schema (e.g. "membership") in the target database. In SSMS, look at the Login Properties, User Mapping, Default Schema. That way, the application's [dbo].[Users]
would not conflict with [membership].[Users]
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With