I suggest you ...

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.

11 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Phillip SmithPhillip Smith shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    5 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • John DuboisJohn Dubois commented  ·   ·  Flag as inappropriate

        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.

      • WhoeverWhoever commented  ·   ·  Flag as inappropriate

        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.

      • Erik PorterAdminErik Porter (ASP.NET PM, ASP.NET Future Feature Feedback) commented  ·   ·  Flag as inappropriate

        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.

      Feedback and Knowledge Base