2008-11-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Mon, 10 Nov 2008 20:46:00 +0000 (20:46 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Mon, 10 Nov 2008 20:46:00 +0000 (20:46 -0000)
* ConfigurationManager.cs: when we're dealing with an EXE hosted
application, the configuration file is the one for the AppDomain,
otherwise we might try to get a config file for a dll. Fixes the
regression in 2.0 sys.config.

svn path=/trunk/mcs/; revision=118410

mcs/class/System.Configuration/System.Configuration/ChangeLog
mcs/class/System.Configuration/System.Configuration/ConfigurationManager.cs

index 6110062f549d8d27641e9c562bbc4589c25cb77b..e65d132a29a3862c8436c348c5f051b3440ab88b 100644 (file)
@@ -1,4 +1,11 @@
 
+2008-11-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * ConfigurationManager.cs: when we're dealing with an EXE hosted
+       application, the configuration file is the one for the AppDomain,
+       otherwise we might try to get a config file for a dll. Fixes the
+       regression in 2.0 sys.config.
+
 2008-07-09  Marek Habersack  <mhabersack@novell.com>
 
        * ConfigurationManager.cs: implemented a work-around for
index 0a2b895c28249b603f09751b30eca2d5d69de335..eaa9371b95e47db705b1858823fabdf1bc5f4225 100644 (file)
@@ -94,10 +94,7 @@ namespace System.Configuration {
                        switch (userLevel) {
                        case ConfigurationUserLevel.None:
                                if (exePath == null || exePath.Length == 0) {
-                                       if (!systemWebInUse && calling_assembly != null)
-                                               exePath = calling_assembly.Location;
-                                       else
-                                               exePath = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
+                                       exePath = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
                                        map.ExeConfigFilename = exePath.EndsWith (".config") ? exePath : exePath + ".config";
                                } else {
                                        if (!Path.IsPathRooted (exePath))