gpt4 book ai didi

azure - 为什么当我进行交换时 Azure Staging 功能会替换连接字符串

转载 作者:行者123 更新时间:2023-12-01 02:19:22 25 4
gpt4 key购买 nike

这是有关新 Azure Staging Feature 的完整详细信息。它说

Some settings from the staged version will automatically copy to the production version – including things like connection string overrides, handler mappings, and other settings you might have configured. Other settings like the DNS endpoints, SSL bindings, etc will not change (ensuring that you don’t need to worry about SSL certs used for the staging domain overriding the production URL cert, etc).

我不明白的是,它说连接字符串被覆盖。当我交换连接字符串时,它们会相互交换。因此,在这种情况下,我的临时网站数据库将成为生产数据库。我期望的是,它根本不触及连接字符串,我的生产站点将继续使用相同的数据库,但它使用临时数据库,因为连接字符串彼此交换。

是否可以将临时网站配置为不替换连接字符串?

交换导致在生产网站上使用测试数据库,这不是 azure 团队的错误设计吗?

最佳答案

不幸的是,这就是现在的设计。 AppSettings 只是环境变量。要在交换上加载不同的环境变量,这将需要重新启动进程,这将破坏此功能的主要要求之一,即消除冷启动时间。

目前,您可以自动将临时数据库更改为生产数据库,然后在交换之前访问您的站点以对其进行预热。但请记住,此功能现在处于预览阶段,有些内容可能会发生变化。

关于azure - 为什么当我进行交换时 Azure Staging 功能会替换连接字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21736259/

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