Child web.config cannot clear <pages> <controls> from parent web.config
How can I "clear" the provider defined <controls>
in my web.config child application?
Parent web configuration.
<system.web>
<pages>
<controls>
<!-- START: Vendor Custom Control -->
<add tagPrefix="asp" namespace="VENDOR.Web.UI.Base" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral />
...
<!-- END: Vendor Custom Control -->
...
</controls>
<tagMapping>
<add tagType="System.Web.UI.WebControls.WebParts.WebPartManager" mappedTagType="Microsoft.Web.Preview.UI.Controls.WebParts.WebPartManager" />
<add tagType="System.Web.UI.WebControls.WebParts.WebPartZone" mappedTagType="Microsoft.Web.Preview.UI.Controls.WebParts.WebPartZone" />
</tagMapping>
</pages>
</system.web>
Child:
<system.web>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
<tagMapping>
<clear/>
</tagMapping>
</pages>
</system.web>
I am working in a section <tagMapping>
but <controls>
do not maintain <clear/>
.
a source to share
There is a slightly known way to stop web.config inheritance . In your case, you will stick <location inheritInChildApplications="false">...</location>
around the element <system.web>...</system.web>
. Of course, this will remove the inheritance of everything in the section, but it will solve your inheritance problem if that's what you are looking for.
a source to share