Implementing Custom MembershipUser

前端 未结 3 1844
清歌不尽
清歌不尽 2020-12-13 22:38

I am going round in circles and need some help in implementing a Custom MembershipUser so that I can add my own custom Properties to the MembershipUser.

I have been f

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-13 22:45

    Based on my own experience trying to do much of the same, trying to use the MembershipProvider to do this will be an ultimately frustrating and counterintuitive experience.

    The idea of the membership provider model isn't to change or augment what the definition of a user is, as you're trying to do - it is to allow the Framework an alternate means of accessing the information that has already been defined as belonging to a "MembershipUser".

    I think what you're really looking for is a user profile. Using ASP.NET profiles is boatloads easier than implementing your own provider. You can find the overview here.

提交回复
热议问题