ASP.NET中禁止继承IIS中web.config根目录的配置
異常信息:
Configuration Error
Description:?An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.?
?
Parser Error Message:?The entry 'XXXXX' has already been added.
?
此錯誤一般是訪問虛擬目錄時拋出的異常 導致此異常的原因是因為虛擬目錄中項目默認繼承了主站的配置文件出現(xiàn)配置沖突
解決方案:在主站配置文件中禁止繼承允許重寫
? <configuration>
<configSections> </configSections>
??? <location path="." allowOverride="true" inheritInChildApplications="false">
????? <system.web>
??????? <httpModules></httpModules>
????? </system.web>
?? ?</location>
? </configuration>
轉(zhuǎn)載于:https://www.cnblogs.com/huaguduo/p/4649510.html
總結(jié)
以上是生活随笔為你收集整理的ASP.NET中禁止继承IIS中web.config根目录的配置的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 多线程笔记5
- 下一篇: DIV+CSS 入门