Nick
Nick

Reputation: 5892

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?

Upvotes: 1

Views: 2019

Answers (2)

Darin Dimitrov
Darin Dimitrov

Reputation: 1039508

You could use a custom Profile Provider to achieve this. And here's a blog post which you might find useful as well.

Upvotes: 2

Related Questions