IIS - Force IIS to stop Caching pages

Asked By Dave Young
03-Mar-08 02:42 PM
Ever since we moved from Server 2000 to Server 2003, we've been having
issues with IIS caching pages.  This happens with static (html) and dynamic
(asp.net) pages.  During our normal code promotion process, we use xcopy to
copy the files from one server to another.  What we are finding is that
after copying the files, the server is still showing the old content.

We have closed internet explorer, emptied it's cache, deleted the temporary
internet files folder and done all the steps we normally do to ensure that
it's not being cached on the client side.

We've disabled caching on IIS (so we thought) by setting the "Enable content
expiration" flag to "Expire Immediately".  We've also set the
HKLM\SYSTEM\CurrentControlSet\Services\HTTP\Parameters\UriEnabledCache=0

We've tried stopping and restarting both the web site and the application
pool, we've also stopped and restarted IIS Admin Service and the WWW
publishing service.

All of this and we are still seeing the old content on the server.  I
created a new IIS web site on one of my servers and pushed the code to that
web site and can see that the code changes are there, but when I copy that
same code to our UAT server, we don't see the changes.

What are we missing?  Any suggestions?
Windows Server 2003
(1)
IIS
(1)
UriEnabledCache
(1)
Invalidates
(1)
Registry
(1)
Proxies
(1)
Broswer
(1)
Admins
(1)
  Kristofer Gafvert replied...
04-Mar-08 01:12 AM
Do you have anything between the server and client (such as a proxy) that
can cache the pages?

--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info
  Dave Young replied...
04-Mar-08 06:01 PM
According to our network admins, that would be "no".
  Ken Schaefer replied...
05-Mar-08 06:49 AM
The Expires header applies to the client, not the server.

Where is the content hosted? On local disks? NAS? SAN?

Cheers
Ken
  Dave Young replied...
07-Mar-08 04:36 PM
Not sure how to respond.  it is running on VMWare, so the content is on the
local drive, but the local drive is acually on the SAN's.

So, I guess, that is both?
  David Wang replied...
09-Mar-08 09:02 AM
It cannot be both local and remote. Your storage system is effectively
remote. "local drive letters" mean nothing.

FYI: If you restarted IIS Admin Service and WWW Publishing Service and
you still see cached pages, the issue is no longer with IIS. IIS's
static file caches are in memory and purged when you stop the service,
so if it still is stale after you restart IIS, the stale pages are
coming from somewhere else.

Expires header applies on the client, not server, so it has nothing to
do with stale content from IIS. Likewise, UriEnabledCache turns off
the static file cache, so if you still see stale content, it has
nothing to do with IIS.

Basically, you have proven that your issue has nothing to do with IIS
and is not an issue with "force IIS to stop caching pages".

You have said that client caches are cleared as well, and network
admins say there is no caching proxies. So, you should not be seeing
stale pages, but you are.

Ken's suspicion of your SAN is a likely candidate. Perhaps your SAN is
not immediately updating your uploaded changes to your UAT server
because it is a big change, so it is only doing the update slowly.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//






he
g

we
e

he
e=3D0
=A0I
o
  robbieh replied...
03-Oct-08 07:12 AM
After uploaded a working site from an existing test server to a beta server, both running Win2K3, ASP.Net 2.0 and IIS6, a version of each page that was last viewed (stale) is then displayed.



The problem is not experienced if: -



1) ctrl-F5 is pressed in the broswer



2) the page is not viewed for 30 seconds



3) Asp.Net tracing is turned on with page output



Dynamic ASP.Net generated pages are being cached at the (aspx) page level and not even a change in the querystring causes a fresh page to be served.



I have tried disabling every IIS cache setting I can find in the registry and restarting IIS and accessing the website without any proxies and yet the problem remains...



Output caching is not currently enabled/used for any Web Pages. Any insight or possible solutions to this issue would be greatly appreciated.
  David Wang replied...
04-Oct-08 09:30 PM
er, both running Win2K3, ASP.Net 2.0 and IIS6, a version of each page that =
was last viewed (stale) is then displayed.
and not even a change in the querystring causes a fresh page to be served.
and restarting IIS and accessing the website without any proxies and yet t=
he problem remains...
ht or possible solutions to this issue would be greatly appreciated.


If you see the problem even when you restart IIS, the caching issue is
guaranteed to not be with IIS itself.

I can say that you are looking for a cache that is not in IIS nor
anything running on IIS. Kernel mode response cache invalidates based
on querystring, even for dynamic content. ASP.Net does not have
persisted cache that survives restarting IIS.

You will have to look elsewhere in the networking stack between your
client browser and the server. It looks like a proxy or browser-side
cache to me.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
  David Wang replied...
07-Oct-08 01:56 AM
er, both running Win2K3, ASP.Net 2.0 and IIS6, a version of each page that =
was last viewed (stale) is then displayed.
and not even a change in the querystring causes a fresh page to be served.
and restarting IIS and accessing the website without any proxies and yet t=
he problem remains...
ht or possible solutions to this issue would be greatly appreciated.


If the issue persists after restarting IIS, then your issue has
nothing to do with caching on IIS. No IIS or server-side cache setting
is in effect with what you observe.

You will have to look for caching behavior between the web server and
your client. I would start with any intervening proxies and the client-
side page cache.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
Create New Account
help
iis7 on windows server 2003 r2 IIS Is iis7 available on windows server 2003 r2? IIS Discussions Windows Server 2003 (1) Windows Server 2008 (1) Windows Vista (1) Iis7 (1) IIS7 is only available
Windows Update related to IIS IIS Hello: My IT department pushed the folllowing updates to the server. Windows Internet Explorer 7 Dynamic Installer Cumulative Security Update for Internet Explorer 7 Dynamic Installer for Windows Server 2003 (KB953838) Wednesday, August 13, 2008 Other Source Windows Server 2003 Update for Windows Server 2003 (KB951072) Wednesday, August 13, 2008 Automatic Updates Windows Server
IIS 7 IIS Is IIS 7 supported on Windows server 2003? IIS Discussions Windows Server 2003 (1) Vista (1) IIS (1) McNight (1) Hi, No, you cannot install IIS 7 on Windows Server 2003. You can only install it on the version of Windows it was shipped with
Cannot run old ASP files in Windows 2003 Server R2 64 Bit IIS I have old ASP pages that runs on Windows 2003 Server 32 Bit. I now am trying to run them on Windows 2003 Server 64 bit. I get the error HTTP / 1.1 500 Server Error IIS is
Installing ISS on Windows Server 2003 R2 IIS Hi, I'm trying to install ISS under windows Server 2003 - I go to the windows components on add / remove programs and select Application Server - Which includes IIS in its details - I click next and it asks for the Windows