0

I have a WCF service hosted on IIS7. I am using source control tool (IBM RTC) to manage code base and continuous deployment on our testing server. but my deployment is failing because IIS has acquired lock on log file.

Error message:

 The command "ren "<some service path on network share>" ""<to path on network share>""" exited with code 1.

When I debug the issue more, I found it is failing because of error "the file is open in IIS Worker Process".

During the deployment, I am renaming old deployment folder with "_old" keyword and creating a new folder with new binaries.

How can I force IIS to release lock on log file.

3
  • Have you tried stopping the application pool during deployment? I doubt IIS has a lock on your file, it is the application running in the worker process. Jun 8, 2016 at 19:06
  • If I stop AppDomain/application, it works fine but this is manual process and our deployment is completely automatic. I want to do it from MS Build project itself.
    – Abhash786
    Jun 9, 2016 at 6:13
  • that's understandable, you could add Stop-WebAppPool to your deployment script, but then it would have to run as administrator, which is not desirable. But then any major operations on IIS to get rid of the lock would require administrator rights. So you better find out why the app in the Worker Process is holding a lock. This doesn't sound like an IIS problem to me. Jun 9, 2016 at 7:29

0

You must log in to answer this question.

Browse other questions tagged .