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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Roles & TabPermissions Delayed or cached.Roles & TabPermissions Delayed or cached.
Previous
 
Next
New Post
10/28/2006 7:18 PM
 

I know that I've seen another similar post somewhere but can't seem to find it again. 

I'm on 4.3.5 and have a module to create a tab, create new roles and apply the roles to the tab on the fly.  My dilema is that DNN appears to be caching my role and tabpermission information.  It seems to take (at times) about 30 seconds between when I programatically create the tab/assign the role and when the user can get access to the tab.

The user gets redirected to the ol' "You do not have permissions" page but after a couple of attempts, the roles and tab settle down and everything is fine. 

I've attempted to disable caching in the host settings, adding ClearPortalCache before and after I've done my tab/role code, played with hydration of the user, etc.  Just seems that the calls to TabInfo.AuthorizedRoles don't read the database directly but instead read the cache.

Does anyone know what's going on here? 

Thanks,
Bob
http://www.autisticvoice.com/bob
bob@autisticvoice.com

 
New Post
10/29/2006 8:52 AM
 

After you add people to the new role, you need to expire their current cached roles.  This will force DNN to look it up again, giving them access to everything.

' Expire role cookies so new tabs are accessible
Response.Cookies(
"portalroles"
).Expires = DateTime.Now.AddDays(-1)
Response.Cookies(
".ASPXROLES").Expires = DateTime.Now.AddDays(-1)

 
New Post
10/29/2006 5:17 PM
 

Thanks!  That did the trick.  I don't know why I always attack things from the most difficult angle first and tear into portal caching and role providers :)

Thanks again!
Bob
http://www.autisticvoice.com/bob
bob@autisticvoice.com

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Roles & TabPermissions Delayed or cached.Roles & TabPermissions Delayed or cached.


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