Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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

 
discard

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.