views:

227

answers:

2

What is the role of the Profile Provider in ASP.NET / MVC?

What kind of information should be stored/retrieved using this functionality? How does it fit in with the rest of the family of user providers:

  • Profile Provider
  • Membership Provider
  • Role Provider
    ?
+3  A: 

It's simply a way to store user information. A couple of examples I've used it for

  1. Storing a company or client id that the user is associated with.
  2. Storing user settings (color, fonts, pages) specific for my application

Another advantage is the profile provider does not require authentication so you can use it even if you are not using the Membership provider

Cody C
Is it cookie based?
KingNestor
It does use cookies. I've found a decent article that may help http://www.odetocode.com/articles/440.aspx
Cody C
If you want it to work without authentication and persist across sessions, then it places a user token in a cookie - the actual profile is still stored on the server.
Zhaph - Ben Duguid
A: 

How about using the Profile Provider to store a serialized copy of something like a users shopping cart? Is the Profile Provider not suitable to store this kind of data?

coryT