tags:

views:

242

answers:

3

I have an application written in .NET 1.1 that calls XmlDocument.Load on a URL. Just recently the xml file was updated. Now whenever I call XmlDocument.Load, the old file is returned. When I hit the same URL from a browser, I see the new file. I deleted all temporary files from IE and I still see the same issue. Any thoughts on why I am seeing a older version of the file when I access it programmatically?

+2  A: 

Just a guess, but try clearing your IE's browser cache. .NET HTTP is sitting on top of the same stack as IE and also share proxy settings, so I would not be surprised if the cache is shared, too.

cdonner
Doing the download oneself using HttpWebRequest it is possible to set the caching policy to RequestCacheLevel.BypassCache.
Richard
+1  A: 

delete also the ASP.net temporary files

Oscar Cabrero
where are these located?
adeel825
in the Windows/Microsoft.Net/..../Temporary Files or something close to that.
cdonner
ok done - but still have the issue.
adeel825
Did you clear the browser cache (i.e. delete temporary files in IE)?
cdonner
yes - did that as well
adeel825
How is the file being served?
cdonner
via an intranet web server. From IE I can see the new file, but doing an XmlDocument.Load still returns the old one.
adeel825
maybe this sounds weird but search for the file in the application data folder under document and Settings\User\ApplicationData
Oscar Cabrero
Then I have no further input, short of running a sniffer to check if the request is going to the right place, and searching the local disk for a copy of the file.
cdonner
running IISRESET works for me
Oscar Cabrero
A: 

So it appears that there must have been some caching on the proxy and this cleared up by itself in 48 hours.

adeel825