Search code examples
c#.netazureazure-web-app-service

Azure web app not updating after successful deployment


I have a web app on Azure that hosts a web API. I updated my code on Visual Studio then push the updates to the web application on Azure. It says that it is getting successfully updated. I tried publishing via git and via ftp it is getting successfully updated on the cloud but still returns the old version on get request.


Solution

    • I have created ASP.Net Web API and published to Azure.

    Initial Output : Initial Output

    • I have made few changes to the Get request.
    • In Publish window, under Settings section click on Show all settings.
    • Under File Publish Options, enable the Remove additional files at destination option.

    enter image description here

    • This ensures that all the old, cached data gets deleted and updates with the latest code changes.

    • Re-deploy the app and restart in Azure portal.

    New Output : enter image description here

    • You can even deploy the App using Import Profile .

    • Create an Azure App service in Azure portal,click on Download publish profile. enter image description here

    • Enable the option of Remove additional files at destination here as well.

    • In VS, Import the downloaded publish profile and continue the steps to deploy to Azure. enter image description here