When you upload a new ASP.NET text file (for example web.config or an .aspx file) on Loopia’s Windows platform, the browser may still display the old result for a short period. This article explains the technical reason for the delay and how to force an immediate update.
Why the update is delayed
Whether you refer to it as re-compilation, compilation, upload or something else, the underlying cause is the same: ASP.NET relies on file system change notifications, which behave differently over a network share.
ASP.NET v2.0 uses FileChangeNotifications (FCN) exclusively to detect changes:
The Win32 call used is described in MSDN as FindFirstChangeNotification:
This means that a directory or file system is monitored separately and that applications receive a notification when a change is made. ASP.NET applications are recycled as soon as a change is detected (a directory or file is created, deleted or modified).
Limitations on network storage
In our web environment, we have a powerful Network Attached Storage (NAS) where all customer material is stored, and the Windows servers access it via SMB/CIFS.
FindFirstChangeNotification only works over SMB/CIFS for a relatively small number of directories (which is not enough for the many customer directories we have). Microsoft describes the limitations at:
There is currently no way to work around this restriction in ASP.NET itself.
How updates are applied at Loopia
A periodic recycle of all ASP.NET applications occurs once a day (based on when each application was last updated). In Loopia Customer Zone you can also request that the ASP.NET application be updated on demand, for example after you have made changes.
NetApp (Network Appliance), which manufactures our NAS machines, has indicated that it should be possible to work around the limitation in a later version of their operating system.