views:

309

answers:

1

I am trying to run a standard SubText blog engine as a sub application to a standard MS MVC website. The Web.configs have conflicting entries. I know there is some way to limit the scope of these entries in the web.config, but I have yet to make it work. Any ideas? I tried using a <location> tag but it cannot exist at a root xml level. Trying to use <remove> statements seem to be simply ignored. The details:

The sub app 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.

The sub app code:

<sectionGroup name="system.web.extensions"
type="System.Web.Configuration.SystemWebExtensionsSectionGroup, 
System.Web.Extensions, Version=1.0.61025.0, 
Culture=neutral, PublicKeyToken=31bf3856ad364e35">

The parent app code:

<sectionGroup name="system.web.extensions"
type="System.Web.Configuration.SystemWebExtensionsSectionGroup, 
System.Web.Extensions, Version=3.5.0.0, 
Culture=neutral, PublicKeyToken=31BF3856AD364E35">`
+1  A: 

What is stopping you from deleting that sectionGroup in the sub app config? Should work fine that way...?

If that breaks something, try adding a runtime assembly redirect 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>
Bryan
I think we are talking about having the sub app use Ajax 3.5 rather than Ajax 1.0. So, should we expect that the Ajax 3.5 interface behaves and looks exactly the same as the 1.0 version (as not to break anything?) This is a great argument for unit tests. :)
Dr. Zim
Well... I haven't used this toolkit too much myself, but OF COURSE the interface in 3.5 should still support 1.0 apps. That's part of the "interface contract" Microsoft has been telling us about since the COM days. :) Did my solution not work?
Bryan
Well, its difficult to say. When I deleted the sectionGroup, it got past the one issue only to find numerous other redundant references. The runtime assembly redirect I tried in the parent app, but still ran in to issues. I ended up switching the blog engine to BlogEngine.Net LOL, which worked fine even though it was dot net 2.0 and MVC is dot net 3.5. There is something about the AJAX 1 that failed a bunch of stuff.
Dr. Zim