开发者

Custom User.Identity to add property

I customize RoleProvider and MembershipProvider classes

I would like to add one more property in my @User.Identity, as do so?

example:

@User.Identity.About => .About not ex开发者_运维问答ist yet

I thought I'd customize IIdentity but do not know where to start.


You need to create your own classes that implement IIdentity and IPrincipal. Then assign them in your global.asax in OnPostAuthenticate.


Just create a wrapper and override Page.User.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜