I have defined a couple of different roles in my asp.net website : Administrators, DefaultUsers. Currently i use the built-in profile provider to store some information about the user (first name, last name, avatar ...). What i would like to do next is provide a user who has the "Admistrators" role to store some data about his preferences. (maybe EditorType, Notifications,LogSize ...).
Is it something that can be done with the default Profile provider? or do i have to build a custom table or a custom provider and maintain these data myself? What i would like to have are role-based profile properties. Any ideas are welcome!
What you want to achieve is not possible since one profile binds to one user and not to role. Users can have multiple roles but not multiple profiles.
If you want to do it anyway, you can go on creating properties available to all users but effective only to those in Admin. role only. You can do this check in code.
I recommend you not to use ProfileProviders in this scenario. Everything is stored as text in this case which will deteriorate the application performance heavily.