How to resolve nested conflicting web.config entries in sub-web applications?
I am trying to run the standard SubText blog engine as an add-on to a standard MS MVC website. Web.configs has conflicting entries. I know there is some way to limit the scope of these entries in the web.config file, but I have yet to do it. Any ideas? I tried to use the tag <location>
but it cannot exist at the root xml level. Attempting to use operators <remove>
seems to be simply ignored. Details:
Helper Application Error:
Section or group name 'system.web.extensions' is already defined. Updates to this may only occur at the configuration level where it is defined.
Helper Application Code:
<sectionGroup name="system.web.extensions"
type="System.Web.Configuration.SystemWebExtensionsSectionGroup,
System.Web.Extensions, Version=1.0.61025.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35">
Application parent code:
<sectionGroup name="system.web.extensions"
type="System.Web.Configuration.SystemWebExtensionsSectionGroup,
System.Web.Extensions, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35">`
source to share
What prevents you from deleting this Group section in the sub app config? Should work as it should ...?
If that breaks anything, try adding a runtime build redirection for System.Web.Extensions:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
source to share