I am trying to deploy a .NET Web application to IIS (7.5) without any hassle for the users. I have made sure that Disable Overlapped Recycle is False but i still run into the same problem every time.
Every time I upload new binaries for the site, IIS kills the worker process before it has started a new one. So every time I upload new binaries users get this error message:
Server Error in '/' Application. Could not load file or assembly 'MyApplicationWeb' or one of its dependencies. The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)
I have no idea how to do this seamless. As it is now I just upload the binary; but while the upload occurs (or local copy) it will give the above quoted behaviour. I also tried using a Web garden but with same result.
What I am not looking for:
- How to solve it with external load balancers (it's a functional solution but it is perfomance wise a bad solution for few servers and it won't work at all if there's only one server)
- How to create a hack-around with a refresh in a custom error page (as it has some obvious problems but more importantly wont work at all with web services/ajax).
I really think this should be doable given http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/24e3c22e-79a9-4f07-a407-dbd0e7f35432.mspx?mfr=true
Update: In article above they say:
However, because the shutdown timeout value of a shutdown or startup is configurable, the worker process can be terminated while it is still serving requests if it does not finish servicing existing requests within the time limit.
I have no idea where to find this value nor what it's default. If its less then a few second it might explain my results.
ps. I am posting it on SO rather than on SF/Webmasters etc because I think this kind of knowledge will probably be minimal amongst people who aren't active in development, I hope this is all right.