Storing additional information in user identity in ASP.NET MVC application
I have created my own MembershipProvider for my ASP.NET MVC 3 application and have it working great.
Once logged in, I can call the logged in user's username by requesting System.Web.HttpContext.Current.User.Identity.Name
.
I'd like to store some additional information about the user here which needs to be reused throughout the application开发者_运维问答.
Could anybody help me out with identifying the best way to do this, possibly with some examples?
You could use a custom Profile Provider to achieve this. And here's a blog post which you might find useful as well.
have a look on this..may be helpful for you http://www.asp.net/web-forms/tutorials/security/membership/storing-additional-user-information-cs
精彩评论