Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a windows server 2008 R2 running a couple of sites for me, while developing i usually post updates to this server. Now, i tried posting an update but it failed said it has a file in use and the error msg is as follows:

"The action can't be completed because the file is open in IIS Worker Process"
"Close the file and try again."

I have tried stopping the site but this does not help. The site is running in the same application pool as the site that should stay online so a recycle might be breaking the running site (If this is wrong, please correct me).

Question is: Is there a way to "Release" the lock that is put on the file without stopping other currently running sites?

share|improve this question
up vote 0 down vote accepted

What app do you get that message from?

Seems more likely that the app itself (or the app framework) is locking the file than the app pool per se.

For the future, run each site in its own app pool, and consider running any app that needs to be restarted separately from others in its own app pool too.

The app pool is the unit of robustness; the app (or AppDomain for ASP.Net apps) is a container that has logical but not complete separation.

share|improve this answer
I Get this message when i try to delete a file in the BIN folder of the site. The reason for deleting it is so i can update the site with a new build. I can recycle the application pool and after that the file is "released" and i can delete it. Good idea to use one app pool per site. I will consider this for my next sites. – Bjørn Øyvind Halvorsen May 31 '12 at 10:49

You must stop the WORKER in IIS. Then delete the file.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.