473,405 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Re-cache when new records are added

Hello!

I am working on a web application with Windows Authentication.
In WindowsAuthentication_Authenticate event of Global.asax file a user is
Authenticated and User/Roles Array is loaded into GenericPrincipal object. So
User.IsInRole("somerole") can be used. User/Roles Array first retrieved from
DB through a stored procedure then cached.
So when new users with roles are added to DB table,
User.IsInRole("somerole") still uses cached array. It doesn't change untill
"iisreset".
Is there way to re-cache upon new record creation? Keep in mind data comes
from a SQL stored procedure, so table dependency is not an option, or is it?
Thank you!

Expand AllCollapse All

Nov 19 '05 #1
1 1328
I implemented DB Cache Dependency in ASP.Net 1.1.
There is a great article that describes how to do it here:
http://www.eggheadcafe.com/articles/20040607.asp
(See my comments at the bottom of this article for improvements in the
published technique.)

This is a great tool to have in your bag of tricks!
--
Joe Fallon

"WebMatrix" <We*******@discussions.microsoft.com> wrote in message
news:E5**********************************@microsof t.com...
Hello!

I am working on a web application with Windows Authentication.
In WindowsAuthentication_Authenticate event of Global.asax file a user is
Authenticated and User/Roles Array is loaded into GenericPrincipal object.
So
User.IsInRole("somerole") can be used. User/Roles Array first retrieved
from
DB through a stored procedure then cached.
So when new users with roles are added to DB table,
User.IsInRole("somerole") still uses cached array. It doesn't change
untill
"iisreset".
Is there way to re-cache upon new record creation? Keep in mind data comes
from a SQL stored procedure, so table dependency is not an option, or is
it?
Thank you!

Expand AllCollapse All

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Craig Bailey | last post by:
Anyone recommend a good script editor for Mac OS X? Just finished a 4-day PHP class in front of a Windows machine, and liked the editor we used. Don't recall the name, but it gave line numbers as...
1
by: Chris | last post by:
Sorry to post so much code all at once but I'm banging my head against the wall trying to get this to work! Does anyone have any idea where I'm going wrong? Thanks in advance and sorry again...
4
by: Alan Walkington | last post by:
Folks: How can I get an /exec'ed/ process to run in the background on an XP box? I have a monitor-like process which I am starting as 'exec("something.exe");' and, of course the exec function...
1
by: John Ryan | last post by:
What PHP code would I use to check if submitted sites to my directory actually exist?? I want to use something that can return the server code to me, ie HTTP 300 OK, or whatever. Can I do this with...
8
by: Beowulf | last post by:
Hi Guru's, I have a query regarding using PHP to maintain a user profiles list. I want to be able to have a form where users can fill in their profile info (Name, hobbies etc) and attach an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.