473,387 Members | 1,497 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,387 software developers and data experts.

Problems with Cache Method

I've found this code to help me with my session logout problem. Before I had
a session and when I logged out everything worked fine and I was brought to
the log out page but when i clicked the back button in IE I was brought back
into the cached version of the page in IE. I added the below two lines to the
page load and now the page cache is cleared and and I can check the session
variable and do the nessesary.

My problem is that this doesn't seem to work in ASP.Net version 1.0. I get
the following error.
'System.Web.HttpCachePolicy' does not contain a definition for
'SetAllowResponseInBrowserHistory'

Is there anything similar I can do in ASP.NET 1.0 to achieve the same thing.
//clear down the cache
Response.Cache.SetCacheability(HttpCacheability.No Cache);
Response.Cache.SetAllowResponseInBrowserHistory(fa lse);
if (Session["UserName"].Equals(string.Empty))
{
Response.Redirect("index.aspx");
}
Nov 17 '05 #1
0 830

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

Similar topics

6
by: George McLean | last post by:
Hello, I am trying to isolate some performance issues. The database is DB2 v8.1 running on a Win2000 server with 4 processors and 1gb of RAM. The application is a GIS application that uses...
3
by: Brian Vallelunga | last post by:
I'm having a problem using the Cache object with asp.net. Here is what I have: 1) I put something in cache and set its callback method. 2) The object times out after X minutes and calls the...
5
by: sklett | last post by:
Hi- I am having a hard time decided where I should be implementing my Cache code. I store most of the DataSet's that I need in the Cache. I was doing it in the bind method of my pages, but...
16
by: JCauble | last post by:
We have a large Asp.net application that is currently crashing our production servers. What we are seeing is the aspnet_wp eat up a bunch of memory and then stop unexpectedly. Does not recycle. ...
6
by: Charts | last post by:
I used HttpContext.Current.Cache To cache data from database. The code is like that. public static DataView GetCategories() { if ( HttpContext.Current.Cache == null ) {...
0
by: Rick Hein | last post by:
I've got a problem with an app I've been working on, the Caching object and events not firing correctly. In a nutshell: When I'm debugging, and I set a breakpoint in the removed item call back, the...
11
by: EagleRed | last post by:
I am writing an ASP.NET 2.0 application that uses master pages. I have some pages that must not be cached on the client. In ASP.NET 1.1 I achieved this using metatags: <meta...
2
by: Tomasz | last post by:
Hello, i have following lines in my Page_Load: Response.Expires = -1; Response.AppendHeader("Pragma", "no-cache"); Response.Cache.SetNoStore();...
1
RMWChaos
by: RMWChaos | last post by:
I grabbed this "Rock Solid addEvent" code from this site, which is based on Mark Wubben's event-cache code. (These links for reference only.) I am having two problems with it, and the webmaster is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.