Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 547
David Avatar asked May 19 '17 19:05

David


4 Answers

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

Click on Configure

Check this box

like image 186
Miyamoto Musashi Avatar answered Nov 01 '22 04:11

Miyamoto Musashi


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.

like image 14
David Avatar answered Nov 01 '22 04:11

David


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.

like image 6
Dirk Boer Avatar answered Nov 01 '22 03:11

Dirk Boer


Try this WEBSITE_RUN_FROM_PACKAGE = 0 in my case its helps.

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

like image 1
Karunakaran Avatar answered Nov 01 '22 03:11

Karunakaran