RE: RoleProvider Roles cookieName reading/setting



Hi Chuck,

I think accessing Roles.CookieName at this moment might cause recursive
calling since the RoleProvider haven't get fully initialized yet.

If your objective here is to read the CookieName, you might use following
workaround:

Configuration cfg =
System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~");
System.Web.Configuration.RoleManagerSection rm =
(System.Web.Configuration.RoleManagerSection)cfg.GetSection("system.web/role
Manager");
string cookieName = rm.CookieName;


Could you please tell me why you need to change it in your RoleProvider's
initialize method?


Regards,
Walter Wang (wawang@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

.