- When googling for answers and checking stack overflow it's easy to find answers concerning either Identity 1 or Identity 2. Bear in mind it's easy to jumble them together.
- The db structure for each version is different and if we're not generating the db structure code first style, we need to know exactly what the structure is. I was using Identity 2 with sqlite. Following is the db creation script I've used on github:
https://github.com/simonkatanski/Identity2SqliteScript/blob/master/Identity2SqliteDbScript.sql - Owin comes with an IAppBuilder which is used in many examples. It uses a dependency resolver to resolve User and Role services, acts as a inversion of control container. If we are using a separate container ( and I'm using unity ) this can lead to dbcontext errors.
Following links were really helpful in getting it setup the way it should:
http://stackoverflow.com/questions/24391885/how-to-plug-my-autofac-container-into-asp-net-identity-2-1
http://tech.trailmax.info/2014/09/aspnet-identity-and-ioc-container-registration/
Sunday, 31 January 2016
ASP.NET MVC, Identity 2, Sqlite
Recently I've added users and roles with the Identity 2 support in my ASP.NET MVC project. There were several gotchas that slowed my down considerably. I'll just list them one by one:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment