.NET 4.5 Universal Membership Provider table names

放肆的年华 提交于 2020-01-02 02:20:04

问题


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?


回答1:


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.




回答2:


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].



来源:https://stackoverflow.com/questions/11455676/net-4-5-universal-membership-provider-table-names

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!