I have a web app on azure that hosts a web api. I updated my code on visuall 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.
CodePudding user response:
- I have created
ASP.Net Web API
and published to Azure.
Initial Output :
- I have made few changes to the Get request.
- In
Publish
window, underSettings
section click onShow all settings
. - Under
File Publish Options
, enable theRemove additional files at destination
option.
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 :
You can even deploy the App using
Import Profile
.Create an Azure App service in Azure portal,click on
Download publish profile
.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.