Solved

Response.Redirect target coming from cache

Posted on 2008-10-29
2
555 Views
Last Modified: 2012-06-27
I have an aspx page on a hosted server  that executes a Response.Redirect to another page on my site.  I've updated the called page but the Response.Redirect still has the client browser return the old page.  If I put a URL for the called page directly into the client browser then the new page is executed.  So there appears to be a cache somewhere that the Response.Redirect call pulls data from but that isn't accessed when the client directly puts the URL into the browser.  I've been sure to clear the client browser cache before every call and even rebooted the client machine, so I'm sure the cache isn't in the client.  It acts as if  there's a cache on the hosting server that Response.Redirect calls access before sending the request all the way back to the client.  Does anyone know what might be going on here?

Thanks for any ideas.

steva
0
Comment
Question by:steva
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 37

Accepted Solution

by:
samtran0331 earned 500 total points
ID: 22842058
>> It acts as if there's a cache on the hosting server

There is a cache on the server.
All IIS servers running ASP.Net maintain a server cache, on your development machine, the cache would be at something like:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
And your app gets cached in there every time you make a change that IIS "sees".
So IIS will confuse all the different versions in there especially if you have a lot of different versions (meaning you change files/code frequently)

It's the same for a real IIS server.

If you're positive you did actually publish the changes to the host, some things I would try:
1. Most hosts provide some type of web interface "control panel" for you to maintain your sites, I would try stopping and restarting the site in question.
2. Make a change to your web.config file (like adding one blank line or something) and save it back to the host...this is similar to #1 in that it will force your app to stop/restart...and the web server might catch the change and re-cache the "broken" page.
3. contact the host to see if they will clear the cache (it requires IIS be stopped, so I don't know how willing they will be to do that as a customer request)
4. if they won't do that...I would try deleting the virtual directory on the host and re-creating it

The bottom line is that server cache gets "confused" (for lack of a better word)...and I've never really found any hard documentation on when/why/what it chooses to cache when dealing with ASP.Net

....also...is this is probably a silly question, but if your code is compiled...all the dll's are up to date right?

0
 

Author Comment

by:steva
ID: 22845983
Thanks for the information.  I ended up solving the problem by using Server.Transfer instead of Response.Redirect. Server.Transfer seems to transfer you directly to the local file, with no intermediate caches.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question