tags:

views:

49

answers:

3

One of the projects I am working on includes a website that is hosted on a cheap shared hosting server.

Whenever I upload to the server some updated files, they don't necessarily become available immediately.

It can take from 15 to 30 minutes before the server actually starts using the new files instead of the old ones and in some cases I even need to re-re-upload the updated files.

Some more info: - C# webforms files (.aspx and .aspx.cs) - If there was no previous file with that name on the server then the file always become immediately available - But if I first delete the older file and refresh the page I get immediately a "file not found" error but if I then upload the newer file the "file not found error" stops immediately but I get back the older file again.

I understand that the server isn't actually serving the .aspx page but rather using the compiled to dll version that it has made (right?) so maybe this is a compiling problem on the server somehow?

I'm not sure if this would be better on serverfault.com but as a programmer SO is where I usually come.

Any idea why this is happenning and preferably some solution on how to fix this behavior so that when I upload an updated page we can start using it immediately?

Thank you.

A: 

Usually, touching your web.config file will recycle the web server - if you do that, you should flush any caches. Just upload a new web.config with a trivial change and see if that helps.

Aric TenEyck
I have tried this only once so far so maybe it was just a fluke but it did seem to work. I'll use this method from now on and see how well it works.
tb
A: 

If you are using .NET 2.0 websites, you can have problems with the .dlls in the bin folder. Changing to a Web application should solve your problem permanently.

http://webproject.scottgu.com/

Sklivvz
A: 

I have seen this behavior on one of my sites as well.
In my case the issues began just after the hosting provider had moved my site to their new SAN-solution.

It turned out that this new storage solution did not support "file system watchers".
And without it IIS would never receive any notification of when a file has been updated or not.

The workaround they introduced was to move the applications into new application pools with regular intervals. (This gives the symptoms you are describing with updates only being applied at regular intervals.)

The only solution I found was to move my sites to a different hosting provider.

Ola Herrdahl