Azure Web 应用程序在成功部署后未更新

问题描述 投票:0回答:1

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

c# .net azure azure-web-app-service
1个回答
1
投票
  • 我已创建
    ASP.Net Web API
    并发布到 Azure。

初始输出: Initial Output

  • 我对 Get 请求做了一些更改。
  • Publish
    窗口中,在
    Settings
    部分下单击
    Show all settings
  • File Publish Options
    下,启用
    Remove additional files at destination
    选项。

enter image description here

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

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

新输出: enter image description here

  • 您甚至可以使用

    Import Profile
    部署应用程序。

  • 在 Azure 门户中创建 Azure 应用服务,单击

    Download publish profile
    enter image description here

  • 在这里也启用

    Remove additional files at destination
    选项。

  • 在 VS 中,导入下载的发布配置文件并继续部署到 Azure 的步骤。 enter image description here

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.