成功部署后Az​​ure Web应用程序未更新

2023-12-02

我在 azure 上有一个托管 Web API 的 Web 应用程序。 我在 Visuall Studio 上更新了代码,然后将更新推送到 Azure 上的 Web 应用程序。 它说它正在成功更新。 我尝试通过 git 和 ftp 发布,它在云上成功更新,但在获取请求时仍然返回旧版本。


  • 我创造了ASP.Net Web API并发布到 Azure。

Initial Output : Initial Output

  • 我对 Get 请求做了一些更改。
  • In Publish窗户下,在Settings部分点击Show all settings.
  • Under File Publish Options,启用Remove additional files at destination option.

enter image description here

  • 这可确保删除所有旧的缓存数据并使用最新的代码更改进行更新。

  • 重新部署应用程序并在 Azure 门户中重新启动。

New Output : enter image description here

  • 您甚至可以使用以下方式部署应用程序Import Profile .

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

  • 启用选项Remove additional files at destination这里也一样。

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

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

成功部署后Az​​ure Web应用程序未更新 的相关文章

随机推荐