在IIS7.5上,我有使用parentAppPool的父站点和使用childAppPool的SubApplication。
父站点加载都很好,但是当我以subApplication形式访问http://parentSite.com/SubApplication时,它期望父站点bin提供DLL。
为了防止web.config继承,我尝试用<location path="SubApplication" inheritInChildApplications="false">和<location path="." inheritInChildApplications="false">包装<system.web> --这破坏了父站点的工作。
然后,我尝试将SubApplicationPool中的enableConfigurationOverride="false"属性添加到applicationHost.config中,但这也不起作用
任何帮助都将不胜感激。
高级骨架web.config

当我尝试这样做时,我会得到父站点上的Telerik错误,但是子站点有效!
'~/Telerik.Web.UI.WebResource.axd‘在web.config中缺失。RadScriptManager需要在web.config中注册HttpHandler。请使用控件智能标记自动添加处理程序,或查看帮助以获得更多信息: Controls > RadScriptManager
发布于 2016-04-14 16:11:22
使用<location>元素,我能够禁用继承。

,但这会引发Telerik controls的新错误。
'~/Telerik.Web.UI.WebResource.axd‘在web.config中缺失。RadScriptManager需要在web.config中注册HttpHandler。请使用控件智能标记自动添加处理程序,或查看帮助以获得更多信息: Controls > RadScriptManager
为了解决这个问题,我使用了EnableHandlerDetection属性,如这个Telerik.Web.UI.RadScriptManager文档中所提到的。
EnableHandlerDetection布尔 获取或设置一个值,该值指示RadScriptManager是否应检查应用程序配置文件中是否存在Telerik.Web.UI.WebResource处理程序。 备注 当EnableHandlerDetection设置为true时,RadScriptManager会自动检查它使用的HttpHandler是否已注册到应用程序配置文件中,如果HttpHandler注册丢失,则抛出异常。如果您的方案使用文件输出组合脚本,或者在中等信任条件下运行时,则将此属性设置为false。
,然后我又犯了一个错误,
HTTP错误500.22 -内部服务器错误已检测到不适用于集成托管管道模式的ASP.NET设置。
要解决这个问题,我对<system.webserver>做了以下更改
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
<location path="." inheritInChildApplications="false">
<system.webServer>
<!--<validation validateIntegratedModeConfiguration="false" />-->
<modules runAllManagedModulesForAllRequests="true">
.... other stuff
</system.webServer>
</location>发布于 2016-04-14 13:29:06
如果有希望从继承链中删除的特定配置,则可以使用<clear/>标记删除父级中的任何以前的引用设置,并且可以重新开始。
从这里获取的以下示例演示如何删除以前的memebership详细信息并创建一个新的
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider,
System.Web, Version=2.0.0.0,
Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="MyDatabase"
enablePasswordRetrieval="false"
(additional elements removed for brevity)
/>
</providers>
</membership> https://stackoverflow.com/questions/36623814
复制相似问题