page caching issue. dropdown list not refreshing.

G

Guest

Hi,
I'm having a problem with page caching and therefore reusing dropdown box
contents.
Scenerio:
user1 has security to see list of three items(.aspx populates it with three
items only) in dropdown on page1.
user2 has security to see list of two items in dropdown on page1.

user1 logs in.
when user1 gets to page1, dropdown has three items.
user1 logs out. Session is cleared.
Now, this is without closing a browser.
user2 logs in.
when user2 gets to page1, dropdown has same three items instead of two he is
allowed to see.

This behavior is when "refresh page" set to 'Automatically' in IE.
If it's 'refresh on every visit' is set, this doesn't happen.
The only way for it to be secure right now is to require a user to close a
browswer after working and letting another user to start(same computer of
course).

What I don't understand is where the heck the data is coming from?
I set no caching on top and bottom of the page, like:

in <HEAD> tag before and after <body> tag:
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">


I'm checking the temporary files and there is no page1 there.

When I'm debugging my webapp, it goes a proper route, meaning contents of a
dropdown is changed for a different user.
But with a simple test, without debugger, just using IE browser, dropdown
contents won't change.

How is dropdown getting cached and where?
How to reset it?

Thanks,
Oleg
 
J

Joerg Jooss

Thus wrote Oleg,
Hi,
I'm having a problem with page caching and therefore reusing dropdown
box
contents.
Scenerio:
user1 has security to see list of three items(.aspx populates it with
three
items only) in dropdown on page1.
user2 has security to see list of two items in dropdown on page1.
user1 logs in.
when user1 gets to page1, dropdown has three items.
user1 logs out. Session is cleared.
Now, this is without closing a browser.
user2 logs in.
when user2 gets to page1, dropdown has same three items instead of two
he is
allowed to see.
This behavior is when "refresh page" set to 'Automatically' in IE.
If it's 'refresh on every visit' is set, this doesn't happen.
The only way for it to be secure right now is to require a user to
close a
browswer after working and letting another user to start(same computer
of
course).
What I don't understand is where the heck the data is coming from? I
set no caching on top and bottom of the page, like:

in <HEAD> tag before and after <body> tag:
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

Please forget about META tags. That's an ancient hack that's worthless in
a world of caching proxies. If you want to mark an ASP.NET page uncacheable,
use the page directive

<%@ OutputCache Location="None" %>

or add this to your Page_Load handler:

Response.Cache.SetCacheability(HttpCacheability.NoCache);

In addition to that, make sure you're not victimized by accidental session
id reuse -- see http://support.microsoft.com/default.aspx?scid=kb;EN-US;899918
for more details.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top