I have an asp.net application that uses the file (something like hand-made DB). It opens the file in non-shared mode. That's why only a single instance of application can use it.
But the problems begin when I'm updating the application on server (via app_offline.htm trick)
Sometimes the updated instance of application started before the old application had stopped. I have 2 instances of application working at the same time.
Is there any standard way to prevent it?
PS: I know about "Overlapped recycle" setting in Application Pool, but this is another thing. It is for multiple application pools working at the same time, but I have single application pool with several instances of the same application.