1
votes

I am deploying an ASP.NET Core RC2 app to an Azure App Service instance using Webdeploy from Appveyor.

msdeploy.exe -source:IisApp='%s\.deploy' -dest:IisApp='%s',ComputerName='https://%s.scm.azurewebsites.net/msdeploy.axd',UserName='$%s',Password='%s',IncludeAcls='False',AuthType='Basic' -verb:sync -enableLink:contentLibExtension  -retryAttempts:2"

This worked fine on RC1, but now I am getting the error message:

Error Code: ERROR_FILE_IN_USE More Information: Web Deploy cannot modify the file 'MyTeam.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.

As I understand from the error message, this can be solved by adding

<EnableMSDeployAppOffline>true</EnableMSDeployAppOffline>

in the .pubxml-file for webdeploy, but as I do not have the .pubxml-file I am wondering;

Is there any way to specify EnableMSDeployAppOffline with the msdeploy.exe command?

Or any other graceful way to shut down and restart the App Service from my deployment environment (AppVeyor) ?

2

2 Answers

2
votes
1
votes

Beware of possible known bug in aspnetcore.dll 7.1.1970.0

https://github.com/aspnet/Home/issues/694 https://github.com/aspnet/AspNetCoreModule/issues/50

Check you aspnetcore.dll version (Kudu/ProcessExplorer/you app process/Properties/Modules/aspnetcore.dll)

Actually version 7.1.1971.0 is fixed and AppOffline works well again.