gpt4 book ai didi

asp.net - 划分 web.config

转载 作者:行者123 更新时间:2023-12-04 16:25:14 29 4
gpt4 key购买 nike

我正在开发一个 asp.net 项目,但我还没有很长的 web.config 文件(超过 400 行)。但是有了这个 nhibernate log4net 和 urlrewrites。它越来越大。有没有正确的方法将 web.config 分成几部分。像 nhibernate.config 和 log4net.config 当然 urlrewrite.config

最佳答案

system.webServer是配置节 - 你不能把它外化。

您只能将 configSource= 放在配置 上科 - 例如

<system.webServer>
<validation configSource="validation.config"/>
<modules configSource="modules.config" />
<handlers configSource="handlers.config" />
</system.webServer>

什么是配置节组或常规配置节只能通过查看这些内容的文档来确定(即使如此,通常也不太容易弄清楚它是节还是节组:-()。

关于asp.net - 划分 web.config,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1997372/

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