I have an automatic deployment configured from my GIT
to Azure App
using Web Deploy
. Every time when new code pushed to the repo, build is started, then deployed to the Azure
with Web Deploy
.
The issue is that Web App
(ASP.NET MVC) continue to serve requests using the deployed code, and the file replacement doesn't really affect it. Even if web.config was changed. Basically, the only way I can force the new app to loaded is to restart it (or stop/start) manually.
here is my publishig profile:
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<ADUsesOwinOrOpenIdConnect>False</ADUsesOwinOrOpenIdConnect>
<PublishProvider>AzureWebSite</PublishProvider>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>https://app-name.azurewebsites.net</SiteUrlToLaunchAfterPublish>
<LaunchSiteAfterPublish>False</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<MSDeployServiceURL>app-name.scm.azurewebsites.net:443</MSDeployServiceURL>
<DeployIisAppPath>app-name</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>$app-name</UserName>
<Password>...</Password>
<AllowUntrustedCertificate>True</AllowUntrustedCertificate>
<_SavePWD>True</_SavePWD>
<_DestinationType>AzureWebSite</_DestinationType>
</PropertyGroup>
</Project>
similar topic at msdn with no answer