Use generic types for UserID in Simple Membership Provider
I have to provide membership in an MVC web app to a Microsoft Dynamics CRM back end. CRM uses Guids as entity keys. The new simple provider forces the use of ints. Your old membership providers use Guids. Why not use generics so you can use any data type as key.
We have implemented ASP.NET Identity (new membership system) in VS2013. This system uses strings as PKs. You can also change the PK of the system. You can find more details http://blogs.msdn.com/b/webdev/archive/2013/06/27/introducing-asp-net-identity-membership-system-for-asp-net-applications.aspx
Sam Willows commented
Any new updates on this?
John Dubois commented
Erik: Where can I get help with your first option (modify source)? I've done that but now I'm having trouble with signing the assembly so I can use it.
Simple providers are all made up of hard coded inline SQL statements? That was totally unexpected!
BTW, can someone appoint a namespace Czar in Microsoft? It seems totally out of control.
Phillip Smith commented
Thanks Erik. Nice clean answer.
We are working on a new membership system that will be the same across all of ASP.NET. It will eventually replace the internals of SimpleMembership that you're using now. It will be able to take any type as the key for each user.
So you have a few options:
1. Grab the source code for SimpleMembership (part of ASP.NET Web Pages on http://aspnetwebstack.codeplex.com) and modify it to take a GUID and use your own build of it.
2. Move to the same AccountController and Views that MVC 3 used, which uses the old ASP.NET Membership providers.
3. Wait until we're done with this new provider and switch to it. We're targeting vNext for this.