HTTPModule的Azure应用服务配置设置部分 [英] Azure App Service Configuration Settings for HTTPModule section

查看:73
本文介绍了HTTPModule的Azure应用服务配置设置部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Azure App Service,可以覆盖应用程序设置"和连接"字符串的设置值.

With an Azure App Service, there is the possibility to overwrite setting values for Application Settings and Connection strings.

在web.config中,我们有一个自定义HttpModule(特别是 HttpAuthModule )可以有自己的键/值设置.我想对于任何配置部分(例如日志框架等)都可能发生相同的情况.

In the web.config, we have a custom HttpModule (in particular it is HttpAuthModule) which can have its own key/value settings. I suppose the same could occur for any config section such as logging frameworks etc.

如何在Azure App Services中覆盖这些键(位于appSetting部分之外)?我们希望在不同的环境(不同的应用程序服务)中具有不同的价值.

How can we overwrite these keys (that live outside of appSetting section) in Azure App Services? We want a different value for different environments (different app services).

推荐答案

我能够通过我们的部署过程(Azure Devops)和存档中的令牌化任务(在市场上免费)来做到这一点.

I was able to do this through our deployment process (Azure Devops) and the Tokenize in Archive task (free on the marketplace).

在变量部分中添加名称相同但环境范围不同的变量,然后让要在每个环境中部署的第一个任务运行令牌化任务以在配置文件中的适当位置进行替换(不限于appSettings部分)

Add variables of the same name, but different environment scopes in the variable section, and then have the first task for deployment in each environment run the tokenize task to replace where appropriate in the config file (not limited to the appSettings section).

这篇关于HTTPModule的Azure应用服务配置设置部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆