加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

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

发布时间:2020-12-16 09:42:13 所属栏目:asp.Net 来源:网络整理
导读:在IIS 7.5上,我使用parentAppPool使用parentAppPool和SubApplication使用childAppPool. 父站点加载一切正常,但是当我将子应用程序作为http://parentSite.com/SubApplication访问时,它期望来自父站点bin的DLL 为了防止web.config继承,我试着包装 system.web w
在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>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读