我们可以覆盖父网站的web.config吗? [英] Can we override parent website's web.config?

查看:78
本文介绍了我们可以覆盖父网站的web.config吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站和一个子网站.现在我面临的问题是我的子网站的web.config文件继承了父网站的web.config文件.
我的父网站的web.config文件具有一些<configSections>,而我的子网站不需要这些<configSections> .
我怎样才能做到这一点 ?我尝试搜索网络,但没有任何帮助.

I have a website and a sub website. Now I am facing problem that is my sub website's web.config file is inheriting parent website's web.config file.
My parent website's web.config file has some <configSections> and my sub website does not need these <configSections>.
How can I do this ? I try to search net but find nothing helpful.

推荐答案

是的,您可以在

Yes, you can specify allowOverride in the parent web.config in a location section to allow child web.config values to override the parent ones.

您还可以将inheritInChildApplications设置为false,以使您的部分不会自动继承到子web.config中.

You can also set inheritInChildApplications to false so that your sections aren't automatically inherited into the child web.config.

这篇关于我们可以覆盖父网站的web.config吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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