微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

asp.net – 防止将父web.config继承到IIS 7.5上的子应用程序

在IIS 7.5上,我使用parentAppPool使用parentAppPool和SubApplication使用childAppPool.

站点加载一切正常,但是当我将子应用程序作为http://parentSite.com/SubApplication访问时,它期望来自父站点bin的DLL

为了防止web.config继承,我试着包装< system.web> with< location path =“SubApplication”inheritInChildApplications =“false”>和< location path =“.” inheritInChildApplications = “假” >这打破了父网站的工作. 然后我尝试将enableConfigurationOverride =“false”属性添加到applicationHost.config中的SubApplicationPool,该属性也不起作用 任何帮助,将不胜感激. web.config的高级骨架

enter image description here

当我尝试这个,我在父网站上得到Telerik错误,但子网站工作!

‘~/Telerik.Web.UI.WebResource.axd’ is missing in web.config.
RadScriptManager requires a HttpHandler registration in web.config.
Please,use the control Smart Tag to add the handler automatically,or
see the help for more information: Controls > RadScriptManager

解决方法

如果您希望从继承链中删除特定配置,则可以使用< clear />标记删除父级中的任何先前引用设置,您可以重新开始.

以下从here开始的示例显示了如何删除以前的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>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐