Arunabh Das
Arunabh Das

Reputation: 14382

changing ASP.NET core table names

Is there a good way to change the aspnet_Users, aspnet_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?

Upvotes: 1

Views: 463

Answers (3)

Richard Friend
Richard Friend

Reputation: 16018

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

Upvotes: 2

Adrian Zanescu
Adrian Zanescu

Reputation: 8008

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

Upvotes: 0

Brandon Satrom
Brandon Satrom

Reputation: 1821

If you really want that much control (btw, the OOB stuff works great), you might want to consider implementing your own Membership Provider

Upvotes: 2

Related Questions