0

could you explain to me how can I store and use a custom object exactly like we use the asp.net MVC membership through a website ? I use very often the same one table from my database and I want to stop asking my server to retreive this same information on every page. I can't use cookie because I have some important information into this and I don't use session because I want this object accessible like the membership. After user login, I would like to set this information once and for all into this object until it disconnects.

Examples...

  1. The very normal membership :

    MembershipUser UserAccount = Membership.GetUser(HttpContext.Current.User.Identity.Name);

  2. My custom data object I want to use

    MyCustomData customData = Membership.GetCustomData(HttpContext.Current.User.Identity.Name);

Thank you very much!!

David Létourneau
  • 1,250
  • 2
  • 19
  • 39

1 Answers1

0

You can try to override something like here: ASP.NET MVC Custom Membership Provider - How to overload CreateUser? or create your custom membership provider and add extra methods: Custom Membership Providers (I prefer this)

Community
  • 1
  • 1
webdeveloper
  • 17,174
  • 3
  • 48
  • 47