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>

相关文章

### 创建一个gRPC服务项目(grpc服务端)和一个 webapi项目(...
一、SiganlR 使用的协议类型 1.websocket即时通讯协议 2.Ser...
.Net 6 WebApi 项目 在Linux系统上 打包成Docker镜像,发布为...
一、 PD简介PowerDesigner 是一个集所有现代建模技术于一身的...
一、存储过程 存储过程就像数据库中运行的方法(函数) 优点:...
一、Ueditor的下载 1、百度编辑器下载地址:http://ueditor....