I have an application that is in the .NET Framework version 4.5. It uses web forms and EntityFramework 6.1.1.
An EntityFramework Context object is of type ObjectContext
. I am using ASP.NET membership (Provider membership is configured for user membership) to manage operations related to the user account.
I want to migrate my Web Forms application to ASP.NET Identity.
According to the article http://www.asp.net/identity/overview/migrations/migrating-an-existing-website-from-sql-membership-to-aspnet-identity , I think that to transfer to the ASP.NET identifier I You must perform the following steps:
- Convert ObjectContext to DbContext (and fix related codes)
- Create the new tables necessary for ASP.NET authentication and migrate the data.
- Override account partition codes and other dependent codes necessary to match business logic. (not necessary)
I have few questions in my head:
1) I have configured the User
membership table, and there are several user foreign keys associated with the User
table. Will it still be possible to upgrade to Identity without losing any data?
2) Since I use EntityFramework, therefore, DbContext is necessary to switch to the Identity system. Can I use an ObjectContext to migrate ASP.NET identities?
3) I DO NOT use all membership tables listed at http://i1.asp.net/media/48109/image006.png?cdn_id=2014-11-11-001 . (i.e., aspnet_Applications, aspnet_Membership, aspnet_Paths, aspnet_PersonalizationAllUsers, aspnet_PersonlizationPerUser, aspnet_Profile, aspnet_Roles, aspnet_SchemaVersions, aspnet_Users, aspnet_UsersInRoles, aspnet_WebEvent_vents)
But I only use Application, User, Role, UserInRole, Profile
. Can I wrap this table to use the ASP.NET identifier?
I am ready to provide additional information that you may need to understand my current scenario.
I am looking for the right steps to transition to Identity, what care do I need to take care of, with any obstacles that I encounter? Any help is appreciated.