AzureRmWebAppDeployment fails to stop WebApp and fails with ERROR_FILE_IN_USE
See original GitHub issueOur Release script uses the “Deploy AzureRM Web App” task and we have set “Take App Offline” to true.
Our WebApp no longer deploys, we get the following errors in the log:
2016-12-22T09:15:40.4470806Z ##[error]Failed to deploy website.
2016-12-22T09:15:40.4470806Z ##[error]Error Code: ERROR_FILE_IN_USE
2016-12-22T09:15:40.4470806Z More Information: Web Deploy cannot modify the file 'OurWebApp.exe' on the destination because it is locked by an external process. In order to allow the publish operation to succeed, you may need to either restart your application to release the lock, or use the AppOffline rule handler for .Net applications on your next publish attempt. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.
2016-12-22T09:15:40.4470806Z Error count: 1.
This used to work a while back, I am not quite sure when this error started happening. If we manually stop the app, the deploy works.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:12 (3 by maintainers)
Top Results From Across the Web
failed to deploy web app to App service" in Azure Devops?
How to solve "Error : failed to deploy web app to App service" in Azure Devops? Hi, I really dont know where this...
Read more >Deploying to App Service from Azure Pipeline fails with error ...
task: AzureRmWebAppDeployment@3 displayName: 'Deploy Azure App Service' inputs: azureSubscription: 'Development' WebAppName: '$(AppName)' Package: '$(Agent.
Read more >Azure Web App Deployment error: Web Deploy cannot modify ...
Hi, I'm using Azure Web App Deployment Task in a step of continuous integration on Visual Studio Team Services in hosted environment.
Read more >How to not get "ERROR_FILE_IN_USE " error when deploying ...
I decided this issue by stopping my web app on a hosting. After it all had been succesfully published.
Read more >Dealing with locked files - Azure WebApps - Deployment
Ever encountered an error like this below while deploying your code to Azure webapps? Microsoft.Web.Deployment.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FILE_IN_USE error occurs when DLL’s are locked. App_offline brings the app down and unlocks the resource. ASPCore Module requires
app_offline.htm
but MSDeploy providesApp_Offline.htm
(case sensitive).The fix for app_offline issue will be available soon.
Closing it as there is another issue tracking the same https://github.com/Microsoft/vsts-tasks/issues/3312