2

Closed

inheritInChildApplications cannot be set to false

description

This error occurs because of the way the library accesses the "51Degrees.mobi.config" file.
 
Steps to reproduce:
  1. Create a new MVC3 Application
  2. Wrap the <system.web> tag with <location path="." inheritInChildApplications="false">
  3. Feel the pain.
     
    Steps to fix:
  4. Navigate to FiftyOne.Foundation.Mobile.Configuration.Support.GetConfigurationSectionFromAltConfig
  5. Change "fiftyOneConfig = ConfigurationManager.OpenMappedExeConfiguration(configFileMap, ConfigurationUserLevel.None);"
    to
    try
    {
    fiftyOneConfig = ConfigurationManager.OpenMappedExeConfiguration(configFileMap, ConfigurationUserLevel.None);
    }
    catch
    { // if a <location> wraps the system.web we'll end up here, so use the WebConfigurationManager
    fiftyOneConfig = WebConfigurationManager.OpenWebConfiguration(Constants.CONFIG_FILENAME);
    }
Closed Jun 20, 2012 at 3:26 PM by jwrosewell
Version 2.1.6.11 resolved this issue in our test environment.

comments

ThomasHolmes wrote Sep 28, 2011 at 12:05 PM

Thank you, we'll look at adding this for the next release.

rsiera wrote May 5, 2012 at 1:48 PM

51degrees is being used by Dotnetnuke since v6.1.5.

When upgrading Dotnetnuke to v6.1.5 I got this error. I debugged latest 51degrees source code (v2.1.4.7) and I can confirm that issue still isn't fixed.

ArtemS wrote May 11, 2012 at 3:51 PM

Hi,
I just got this issue too. This was closed in december, it's now may and recent version doesn't include this fix.

I would argue that this is pretty high impact, as it makes <location> tag unusable for anybody using 51degrees.

It also sounds like the code was changed from last year, and the section reported by original reporter is now used for any config load, not just alternate one. Constants.ConfigFileNames now includes regular web.config (not sure if it did before or not). I haven't actually debugged this, just a guess.

The error that you get is

InheritInChildApplications cannot be set to "false" if the location path is referring to machine.config or the root web.config.

which is very confusing, as it doesn't point at 51degrees being the issue.

ThomasHolmes wrote Jun 11, 2012 at 1:11 PM

** Closed by ThomasHolmes 12/5/2011 8:33 AM

jwrosewell wrote Jun 11, 2012 at 1:11 PM

Seeing comments this issue needs to be reopened.

jwrosewell wrote Jun 11, 2012 at 1:52 PM

We have made a change to the support.cs class which has addressed the problem as experienced in our test environment. We expect to release this to codeplex this week in the next versions beta.

jwrosewell wrote Jun 20, 2012 at 3:26 PM

Version 2.1.6.11 resolved this issue in our test environment.