asp.net – 禁用web.config继承?
发布时间:2020-12-15 19:06:18 所属栏目:asp.Net 来源:网络整理
导读:我在我的网站的根目录中有一个内容管理应用程序,我试图在一个子文件夹下使用不同的应用程序(帐单应用程序)。不幸的是,根网站的web.config干扰了子应用程序。 有没有办法只是禁用一个子文件夹的web.config继承? 更新: 由Stephen Burris连结,使用 locatio
我在我的网站的根目录中有一个内容管理应用程序,我试图在一个子文件夹下使用不同的应用程序(帐单应用程序)。不幸的是,根网站的web.config干扰了子应用程序。
有没有办法只是禁用一个子文件夹的web.config继承? 更新: <?xml version="1.0"?> <configuration> <configSections> .... </configSections> <location path="." inheritInChildApplications="false"> <appSettings> .... </appSettings> <connectionStrings/> <system.web> .... </system.web> <system.codedom> .... </system.codedom> <system.webServer> .... </system.webServer> </location> <runtime> .... </runtime> </configuration> < configSections>和< runtime>部分不会接受被包含在标签…所以我想这只有做大部分的工作。任何人都知道如何做得更好? 解决方法
有一个属性可以在根web.config文件中使用,以使其内容不会被子应用程序继承。
inheritInChildApplications Blog about inheritInChildApplications MSDN article on ASP.NET Configuration File Hierarcy and Inheritance (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 获取Asp.net/iis设置Cache-control:静态文件的max-age
- asp.net-core – 如何将安全更新应用于.NET Core项目?
- asp.net-mvc – 在mvc下拉列表中自动恢复
- asp.net-mvc – 在使用WEB API时,如何从POST中提取HttpResp
- asp.net-mvc – 在vs 2010中运行asp.net mvc 2项目时出错
- asp.net-mvc-routing – 在.NET MVC 4.0 URL结构中强制使用
- asp-classic – 检索ADO Recordset字段名称(经典ASP)
- asp.net – 在图表中显示图例
- asp.net-mvc – ASP.net MVC 4中的条件@ Scripts.Render
- asp.net – 如何处理错误时使用jQuery.ajax()?
推荐文章
站长推荐
热点阅读