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 site can use it.
But the problems begin when I’m updating the site on server (via app_offline.htm trick)
Sometimes the updated instance of AppDomain starts before the old application has stopped.
I have 2 instances of AppDomain 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.
This article perfectly explains the situation.
To solve my problem I need to use