web.config中 - 如何prevent全部继承 [英] web.config - how to prevent all inheritance

查看:152
本文介绍了web.config中 - 如何prevent全部继承的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在/.

我们有另一个应用程序中/精简版/虚拟根目录设置为自己的应用程序。

都使用EnterpriseLibrary,但显然/精简版/版本有不同的设置。

问题是,它要继承各种东西,从父应用程序的web.config。

请注意,某些服务器上,它很可能只有/精简版/会存在,所以我们不能依靠的是能够反正继承,因为父母的web.config可能不会一直存在。

我发现引用使用<地点> <清除> ,但我们没有有很多成功的,因为有这么多不同的事情必须做。

有一个简单的方法,使一个虚拟根仅仅是从自治父的web.config?


解决方案

编辑applicationHost.config文件(%WINDIR%\\ SYSTEM32 \\ INETSRV \\配置)和属性enableConfigurationOverride =假添加到你的孩子应用程序池的设置:

 <添加名称=ChildAppPool自动启动=真managedRuntimeVersion =V4.0managedPipelineMode =集成enableConfigurationOverride =false的>
    <中processModel identityType =网络服务/>
< /添加>

We have an app as a root application on the server in /.

We have another application in /lite/ virtual root set up as its own application.

Both use EnterpriseLibrary, but obviously the /lite/ version has different settings.

The problem is that it wants to inherit all kinds of things from the web.config of the "parent" application.

Note that on some servers, it is quite likely that only the /lite/ will exist, so we can't rely on being able to inherit anyway, because a parent web.config may not always exist.

I found references to using the <location> and <remove>, but we didn't have a lot of success, because there were so many different things which had to be done.

Is there a simple way to make a virtual root simply be autonomous from a "parent" web.config?

解决方案

Edit the applicationHost.config file (%WINDIR%\System32\inetsrv\Config) and add the attribute enableConfigurationOverride="false" to your child app pool settings:

<add name="ChildAppPool" autoStart="true" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" enableConfigurationOverride="false">
    <processModel identityType="NetworkService" />
</add>

这篇关于web.config中 - 如何prevent全部继承的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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