Is it possible to specify what is returned by RoleProvider.GetRoles()
if a user is not logged in? I was thinking in case of a 'Guest
' user account.
views:
109answers:
2
A:
RolePrincipal.GetRoles
needs to know who the user is in order to return the Roles it belongs to.
Oded
2010-01-15 16:48:53
So then is there any way to add a 'Guest' role of some sort if there is nothing for it to lookup?
Stacey
2010-01-15 16:56:07
+1
A:
You could implement a custom role provider and override the GetRolesForUser method to return a guest role if no username is passed.
Sheff
2010-01-15 17:37:27