0

We are trying to configure a deployment of ASP.NET application using Octopus deploy. All is working fine, but sometimes the step fails while trying to overwrite files saying the the file is already locked by some other process. We already stop IIS before the deployment starts, so not sure what we can try here. Sometimes the error is in the application customlog folder(txt files), sometimes its in the bin folder for some dll etc.

Exact error is:

*Unable to copy the package to the specified directory 'D:\Apps\XYZ_Stage'. One or more files in the directory may be locked by another process. You could use a PreDeploy.ps1 script to stop any processes that may be locking the file. Error details follow.
Access to the path 'D:\Apps\XYZ_Stage\bin\XYZ.Business.dll' is denied.
System.UnauthorizedAccessException: Access to the path 'D:\Apps\XYZ_Stage\bin\ACA.Business.dll' is denied.*

Any suggestions?

Saurabh Kumar
  • 2,329
  • 6
  • 32
  • 52

1 Answers1

0

If you're using Octopus 2.0 or higher, you can leverage the "IIS web site and application pool" deployment option which causes Octopus Deploy to handle all the complexities of deploying to IIS without you performing manual steps.

Here's some information: http://docs.octopusdeploy.com/display/OD/IIS+Websites+and+Application+Pools

Codatrix
  • 126
  • 4