.NET Core:禁用父应用程序 web.config 继承

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

.NET Core 中是否有任何内容可以配置子应用程序不继承父应用程序的

web.config
设置?

asp.net-core inheritance web-config .net-8.0
1个回答
0
投票

在 ASP.NET Core 中,没有这样的设置可以修改 web.config 以避免子应用程序继承父应用程序的 web.config 设置。

但是在父 web.config 中,您可以在 web.config 中进行以下设置,以避免这些设置被子 web.config 继承。

如下:

<location path="." inheritInChildApplications="false">
   <system.web>
    ...your system.web stuff goes here
   </system.web>
</location>
© www.soinside.com 2019 - 2024. All rights reserved.