I m developing MVC3 application with SQL Server. For security I am using form based authentication (I need to provide authentication and authorization in application).
Currently user are being managed in aspnet_users table by Membership api. I am not getting any other option but to add columns in aspnet_users table.
I need to add the following other columns in aspnet_users table:
- CreatedBy User id which create User
- CreatedOn DateTime
- EditedBy User id
- EditedOn DateTime
- IP Address
I am thinking to write own methods to add these records and not try to disturb aspnet stored procedres.
Any gideance or advice please ? I m sure developers will have such needs.
You should use the Membership User Profile API to extend custom properties to your users, and not directly add columns to the
aspnet_Membership
andaspnet_Users
tables.Take a look at Defining ASP.NET Profile Properties, this should be all you need.
Also by default, each user has a
Comment
column that you could add whatever you want to it in astring
.There is also a Web Profile Builder for Web Application Projects but I don't think you'll need to go that route.