开发者

How to tie SqlRoleProvider to "My" user table

How to tie SqlRoleProvider to "My" user table

I am using asp.net MVC and SqlRoleProvider appears to work out of the box. However I have my own users and roles. I have a user table the has all the user/personalized data. How do I tie the account controller back to my table. My table has a userID and I use that to tie other actions to a particular user.

Wou开发者_StackOverflow社区ld be great if I could use the account controller and after the user logs in, I have their ID.

I have been looking at this but is not quite the same as asp.net mvc

https://web.archive.org/web/20210417083524/https://www.4guysfromrolla.com/articles/121405-1.aspx


Not sure if this is the same in asp.net mvc, but we use the SqlMembership provider for authentication with gives us back a MembershipUser object. The MembershipUser instance has a ProviderUserKey property which we map to our own user table's MemberId field (which is different to our internal UserId).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜