gpt4 book ai didi

azure 插槽交换和 web.config 设置

转载 作者:行者123 更新时间:2023-12-02 06:31:47 26 4
gpt4 key购买 nike

我在 azure 中有几个插槽,一个用于质量保证,一个用于登台,一个用于“实时”。我同时发布到 QA 和 staging,一旦 QA 获得批准,我就想将 staging 与 live 交换(以便 staging 现在变为 live)。

我的问题是,由于 staging 本身就是一个单独的 Web 应用程序,因此它在 web.config 文件中有自己的设置(数据库连接、客户端 ID、客户端 key 等)。也交换配置?因此,如果设置不同,我的“实时”应用程序将不再具有正确的设置(它采用临时 web.config 设置)

这是正确的吗?当我交换部署槽时如何保留我的实时设置?另外,这对网络工作有何影响?我在网络应用程序下有几个,具有相应的 app.config 设置

最佳答案

答案是您可以控制设置在交换期间是否更改或保持不变。查看以下文章:https://learn.microsoft.com/en-us/azure/app-service/web-sites-staged-publishing 。摘自该文章:

Configuration for deployment slots

When you clone configuration from another deployment slot, the cloned configuration is editable. Furthermore, some configuration elements will follow the content across a swap (not slot specific) while other configuration elements will stay in the same slot after a swap (slot specific). The following lists show the configuration that will change when you swap slots.

Settings that are swapped:

  • General settings - such as framework version, 32/64-bit, Web sockets
  • App settings (can be configured to stick to a slot)
  • Connection strings (can be configured to stick to a slot)
  • Handler mappings
  • Monitoring and diagnostic settings
  • WebJobs content

Settings that are not swapped:

  • Publishing endpoints
  • Custom Domain Names
  • SSL certificates and bindings
  • Scale settings
  • WebJobs schedulers

To configure an app setting or connection string to stick to a slot (not swapped), access the Application Settings blade for a specific slot, then select the Slot Setting box for the configuration elements that should stick the slot. Note that marking a configuration element as slot specific has the effect of establishing that element as not swappable across all the deployment slots associated with the app.

关于 azure 插槽交换和 web.config 设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47906246/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com