I've got a c# asp.net project, and I'm using the ADRoleProvider from CodeProject.com. My issue is with GetAuthorizationGroups. I understand that it's the recursive brother of GetGroups. I need that recursive-ness. However, it seems to check a cache/token before heading out to AD to get the list. While I appreciate it, I'd rather have it hit AD. I can't seem to figure out where that role cache is. Initially I was using:
Roles.DeleteCookie();
But that had no effect. Then I removed the use of a cookie for the role provider in the web.config. I figured that would be it, no cookie anymore. Nope, still not right.
Essentially, at this point I am running GetGroups vs. GetAuthorizationGroups and adding/removing myself from AD groups and you can see in real time that one list is current (GetGroups) the other is o开发者_高级运维n what appears to be an unknown delay (GetAuthorizationGroups).
Is the next step sending some no-cache headers? I'd rather crush this at user login and force a current list.
Looks like a similar bug report was filed on this a long time ago on Microsoft Connect. No workarounds have been provided. If you need fresh AD data, it may be best to stick with GetGroups.
精彩评论