Azure Web App Code Not Updating After Publish Until Restart (VS2017)

左心房为你撑大大i 提交于 2020-02-20 09:48:21

问题


I am developing a multi-tier web application consisting of multiple Web APIs in an Azure App Service Environment.

Recently after upgrading to VS2017 I have noticed that the apps will randomly fail to update after I publish new code (from VS). Remote debuggers will not load correctly and the old code will continue to run after publishing.

I am selecting "Remove additional files at destination" in the publish settings.

Restarting the apps usually fixes the problem temporarily, though sometimes I have to stop and restart each app.

Are there any new settings in VS or Azure that could be affecting this behavior, or is something just not working correctly?


回答1:


WEBSITE_DYNAMIC_CACHE is new feature that, for some reason, was turned on by default.

Adding the entry to Application Settings in the Azure Portal and setting the value to 0 seems to have solved the problem.




回答2:


The issue maybe related to the dedicated instances in your ASE. You could submit a support request if you have a support plan.

As a workaround, you could set up a new Worker Pool in your ASE or a new ASE and create a new Web App Plan there. After that, you could move your Web App to the new Web App Plan. Your Web App will run on the new allocated instances. It will solve the issue which related to the dedicated instances.




回答3:


This worked for me: In VS 2017 right-click on the project and choose Publish. Click on Configure, as shown below:




回答4:


I had WEBSITE_LOCAL_CACHE_OPTION 'Always' on for my Production Slot within Application settings. When I created a new slot I copied the settings from the Production slot - including this flag. This had to be turned off for Staging.



来源:https://stackoverflow.com/questions/44077709/azure-web-app-code-not-updating-after-publish-until-restart-vs2017

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!