Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Refresh remotely created rolesRefresh remotely created roles
Previous
 
Next
New Post
6/27/2009 5:07 PM
 

I have an event handler for HttpApplication.AuthenticateRequest that gets user roles from a remote database.

This works well except that when a newly registered user verifies their login, the new roles aren't available until several minutes later. I assume some form of caching is controlling this.

What cache should I clear to ensure the next request uses the new roles? I have tried DataCache.ClearUserCache(portalId,userInfo.UserID.ToString()) but that doesn't have an immediate effect.

 
New Post
6/28/2009 7:36 AM
 

I think I have solved it. The MembershipModule also listens for the HttpApplication.AuthenticateRequest  event and obviously was firing before my custom handler.

I have created a wrapper for the MembershipModule and overidden its OnAuthenticateRequest method to run my custom remote roles code first. After telling the HttpModules section in web.config to use my wrapper instead of the membershipModule, it seems to work as I had originally wanted.

 
New Post
7/8/2009 9:49 PM
 

Just what I was going to suggest


Philip Beadle - Employee
 
New Post
8/20/2009 2:07 PM
 

Perhaps I will start a new thread, but my question is similar to the original question asked here, namely: How can I clear the role cache? I feel like I have tried everything and nothing has worked. I have scoured the web and found various answers, but none have worked. Is there any definitive answer to this question?

My problem is that when I add a new user and assign her to new roles, those roles are not activated for several minutes. There is some caching somewhere and I don't know how to clear it so my new user can get access to role-restricted pages.

Any help here would be VERY much appreciated as I've been struggling with this issue for WAY too long now.

Thanks.

 
New Post
8/20/2009 6:17 PM
 

I'm running DNN 4.9.2 on IIS 6.

The code works just fine on two other test machines (i.e. there's no caching problem). I haven't been able to figure out any difference between the machines that would cause this issue???

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Refresh remotely created rolesRefresh remotely created roles


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out