Bevo,
You are not required to use web.config as the sole place to define roles.
ASP.NET 2.0 supports the Membership and Role provider classes. There is a
built-in implementation of the SqlMembershipProvider and SqlRoleProvider
classes that are designed to work with SQL Server, and there are base classes
from which you can derive your own custom Membership and Role providers.
In this manner, you can create custom roles "on the fly" by adding them to
the appropriate Database tables.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Bevo" wrote:
I'd like to take advantage of the role management classes in 2.0 to allow my
users to give other users access to their data. For this reason I'd like to
create new roles on-the-fly without having to hard-code them in web.config.
Can I do this by calling Roles.CreateRole?
If yes, how does this wok together with roles defined in web.config?
If no, how can I accomplish the above functionality?
Thanks a'bunch!