Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the best place to store user related data in asp.net?

Tags:

When a customer logs in to my site, I need to know their account id and their menu id. This lets me know what data they can see on a page and what menu they get. I don't want to have to read this data over and over. Should I store this in a session variable or customize the membership user and membership provider to contain this information?

like image 766
Mike Roosa Avatar asked Sep 18 '08 18:09

Mike Roosa


2 Answers

As already suggested, the profile system is super easy.

http://msdn.microsoft.com/en-us/library/2y3fs9xs.aspx

like image 150
typemismatch Avatar answered Sep 30 '22 17:09

typemismatch


If you're going to use the profile provider, make sure to check out the "Optimize ASP.NET 2.0 Profile Provider" section of this article if you're running a high-traffic site: http://www.codeproject.com/KB/aspnet/10ASPNetPerformance.aspx

like image 22
Axl Avatar answered Sep 30 '22 15:09

Axl