changing ASP.NET core table names
Is there a good way to change the aspnet_Users, asp开发者_开发问答net_Membership, aspnet_Applications and other table names which are generated by the ASPNET SQL Server registration tool -
http://msdn.microsoft.com/en-us/library/ms229862%28VS.80%29.aspx#3
and change the reference to them in web.config or machine.config without breaking the default login, profiles and roles functionality that is provided by those tables?
If you really want that much control (btw, the OOB stuff works great), you might want to consider implementing your own Membership Provider
If you look in C:\windows\Microsoft.NET\Framework\v2.0.50727\
You can see the installation scripts used to create these tables/procs etc... They are InstallMembership.sql etc..
You could back these up, change them then run aspnet_regsql.exe
I may be wrong but IIRC the standard implementation does not reference the tables directly. All DB calls go though stored procedures created by the same script that creates the tables. Just change the code inside the procedures. Should be easier (but not that elegant) than implementing a membership provider from scratch
精彩评论