Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • webmonger 130 posts 285 karma points
    May 17, 2010 @ 11:27
    webmonger
    0

    Umbraco and MVC Applications in sub directories

    Hi

    I've got a bit of a problem and wonder if someone can help with running independent MVC Application in sub folders of an Umbraco site.

    Here is the setup.

    Domain.com - Umbraco site

    Domain.com/App1 - MVC Application - Different DB no interaction with Umbraco

    Domain.com/App2 - MVC Application - Different DB no interaction with Umbraco

    etc...

    I've added the App1 and App2 folder to the ignore list in Umbraco's web.config but the MVC apps fail

    The error I receive is:

    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: Section or group name 'system.web.extensions' is already defined. Updates to this may only occur at the configuration level where it is defined.

    ------

    I've tried removing the line thats causing the problem but then it starts to error on different lines some of which are required. Has anyone managed to get this kind of setup working? If you have do you have any insight in to how change the config so it works?

    Cheers

    Jon

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    May 17, 2010 @ 11:39
    Matt Brailsford
    0

    Could you add a

    <clear />

     Statement at the top of the relevant sections of the web.config for the sub-applications?

    Matt

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    May 17, 2010 @ 11:48
    Matt Brailsford
    0

    Are all applications set to use the same version of ASP.NET?

  • elspiko 133 posts 302 karma points
    May 17, 2010 @ 11:57
    elspiko
    0

    That error is common with running a .NET 2/3.5 app (and relevant configurations) in a .NET 4 App Pool

  • webmonger 130 posts 285 karma points
    May 17, 2010 @ 13:16
    webmonger
    0

    @Matt Tested the <clear /> solution and that did not work and yes all the apps are set to 2.0/3.5

    @elspiko The production server does not have 4.0 on it at the moment. Just 1.1, 2.0 and 3.5

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    May 17, 2010 @ 13:28
    Matt Brailsford
    0

    I'm guessing that the definitions from the root site are cascading down. As a test, if you point the root site to blank folder, do the virtual apps work?

    If so, maybe try removing definitions in your virtual apps web.config that already exist in the root app?

    Matt

  • webmonger 130 posts 285 karma points
    May 17, 2010 @ 15:13
    webmonger
    0

    @Matt Yes I think i'm going to have to remove them one by one. I've atually already give that a shot and it caused other problems but I think I'll try again.

    I'll get back to you if it works.

    Jon

  • webmonger 130 posts 285 karma points
    May 24, 2010 @ 12:43
    webmonger
    1

    After a good few hours I managed to get this problem resolved.

    Step 1:

    Upgrade you Umbraco web.config to asp.net 3.5 - There seems to be a problem with .net running in 2.0 and other apps running in 3.5 within the same site.

    Step 2:

    Clear all the Config areas that can be so you're working with as close to a standard setup as possible. - I added <clear /> right after the following tags <membership> <profile> <roleManager>

    Step 3:

    <clear /> may have worked here but I've user remove so i know exactly what $'m resetting:

    <!-- This is the config for IIS6 if you're using IIS7 change the settings in the <system.webServer> -->
    <httpHandlers>
    <remove verb="*" path="*.asmx"/>
    <remove verb="*" path="umbraco/channels.aspx" />
    <remove verb="*" path="umbraco/channels/word.aspx" />
    <!-- Your Custom setup here! -->
    </httpHandlers>
    <httpModules>
    <remove name="ScriptModule"/>
    <remove name="UrlRewriteModule"/>
    <remove name="viewstateMoverModule"/>
    <remove name="umbracoRequestModule"/>
    <remove name="umbracoBaseRequestModule"/>
    <!-- Your Custom setup here! -->
    </httpModules>

    Hope this helps others get this setup working. Remember to upgrade your Umbraco install to 3.5 though that was the thing that was causing the main problems other than that elspiko and Matt Brailsford were basically correct in their sugestions.

    Jon

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    May 24, 2010 @ 13:18
    Matt Brailsford
    0

    FYI, not sure how you "upgrade the web.config to asp.net 3.5" but all of my sites are on 3.5 and I just drop the following in before the closing </configuration> tag

    <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>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
      <system.webServer>
        <handlers>
          <add name=".NET Wildcard" path="*" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
        </handlers>
        <security>
          <requestFiltering>
            <requestLimits maxAllowedContentLength="1024000000" />
          </requestFiltering>
        </security>
      </system.webServer>

    Matt

  • webmonger 130 posts 285 karma points
    May 24, 2010 @ 15:20
    webmonger
    0

    Right inunderstand what you're saying but Umbraco 4.0.3's web.config was configured to use 2.0 DLLs. When you open it up in VS2008 you get the option to upgrade the project (and web.config) to the new schema and DLLs.

    When you select yes all of the version numbers for <sectiongroup> <section> <controls><add></controls> etc... get changed from 2.0 to 3.5. This is what I meant by upgrade the web.config.

    Jon

  • Peter Duncanson 430 posts 1360 karma points c-trib
    May 24, 2010 @ 16:13
    Peter Duncanson
    0

    You two are using the alternative 3.5 web.config file (available from the codeplex download page umbraco.codeplex.com/releases/view/33743) and not theone that comes with the Umbraco zip right?

    Directly link to it: http://umbraco.codeplex.com/releases/view/33743#DownloadId=95708

     

  • webmonger 130 posts 285 karma points
    May 24, 2010 @ 17:38
    webmonger
    0

    @Peter Duncanson I think thats what I'm using although i did not download it I just opened the Umbraco install up in VS2008 and it converted it.

    I'll know for future reference that that's whats needed :)

    Jon

  • Peter Duncanson 430 posts 1360 karma points c-trib
    Jun 02, 2010 @ 15:40
    Peter Duncanson
    0

    So you know it looks like the 3.5 web.config is now standard in the 4.0.4.1 version so no need to download it seperately anymore.

Please Sign in or register to post replies

Write your reply to:

Draft