4

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?

5 Answers 5

0

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.

1
  • 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
    May 31, 2012 at 10:49
4

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

1
0

Please go to Task Manager --> Process and find Internet Information Services or find Worker Process and select End task.

This had solved my issue. I got this error upon building the application and tried to delete the App DLLs so that upon building the DLLs will be rebuilt. Upon Deleting I got the error as 'action can't be completed because file is open in iis worker process'.

-1

Stop all the Application pool in Your IIS Server and then removed the all IIS Worker Process in Task Manager.

-2

In taskbar Right click on IIS express then hover on your project. and select Stop your project. https://stackoverflow.com/a/62502732/13787040

1
  • 1
    The question refers to a web server, not to the developer's own machine. IIS Express is completely unrelated.
    – Massimo
    Jun 21, 2020 at 18:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .