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?
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 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.
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.
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
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.
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?
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
Could you add a
Statement at the top of the relevant sections of the web.config for the sub-applications?
Matt
Are all applications set to use the same version of ASP.NET?
That error is common with running a .NET 2/3.5 app (and relevant configurations) in a .NET 4 App Pool
@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
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
@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
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:
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
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
Matt
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
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
@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
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.
is working on a reply...