10
votes

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?

4
If your web app uses Local Cache, you did need to restart your site to get the latest changes. Please check whether you have set the value of WEBSITE_LOCAL_CACHE_OPTION to Always in your Application settings.Amor
I have not set the local cache flag, as I was under the impression that the feature was not available for apps in ASE: stackoverflow.com/questions/36459551/…David
I created a ASE and deployed a web application to it with VS 2017 and I could not reproduced the issue. If the issue occurred again, please check whether the application content are deployed successfully from kudu debug console page. The URL format of web app kudu which hosted in ASE is https://[webapp-name].scm.[ase-name].p.azurewebsites.net/DebugConsoleAmor
Thank you for the information, Amor. I've checked with my team and confirmed that all of our ASE apps are behaving this way. It started last week and occurs sporadically. Would there be any obvious errors present in the Kudu dashboard or do I need to run a powershell command?David
I can confirm that no cache settings have been adjusted in any of the apps (WEBSITE_LOCALCACHE_ENABLED = False). The 'Modified' time stamp on the project .dll files in D:\home\site\wwwroot\bin indicate that the files ARE being updated, but the old code continues to run and breakpoints cannot be hit due to the server-side symbols being different. This behavior started last week and is present on all ASE apps.David

4 Answers

13
votes

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.

8
votes

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

5
votes

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.

0
votes

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

enter image description here

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.