Hi, I am experiencing a VERY weird problem with which I have basically lost the whole day yesterday, and most of today.
On the Vista PC I use at work, the cache dependency on files is for some reasons not working as expected. The same application, when deployed on IIS6/Windows Server 2003 in a VMWare machine (on the same workstation), works fine, and I can see that the caching works exactly as expecting. Whenever I change the content of the files involved in the dependency, the cache is automatically refreshed as it should.
But this does not happen if I run the same application, with exactly the same settings, on Vista's own IIS7. I thought it could be yet another issue due to differences with IIS7, but I now think it is not, because I have tried the same application on my home's Vista, and the cache dependency on files is working fine as well.
I know the question might sound a bit weird, but could it be something related with the operating system or the file system? Otherwise that Vista is working fine every day.
The only weirdness is this: cache dependency on files does not work and the cache is not automatically invalidated / refreshed when I change the content of the files involved.
Just to exclude possible problems with this application (even though on my home pc's Vista it does work), I have also tried on both Vista machines to create an empty application, with just one webform containing a GridView which is bound to a dataset. The dataset is read from an XML file and the content cached.
On one Vista pc the dataset is correctly refreshed whenever the XML file changes, on the other Vista pc it is not.
Please help! The problem happens right on my work pc...
Many thanks in advance.
// nothing special here, just some code I used to reproduce the problem without the original application
protected void Page_Load(object sender, EventArgs e)
DataSet ds = (DataSet)Cache["pets"];
if (ds == null)
string path = Server.MapPath("pets.xml");
ds = new DataSet();
Cache.Insert("pets", ds, new CacheDependency(path));
GridView1.DataSource = ds;