2005-12-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 22 Dec 2005 03:26:28 +0000 (03:26 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 22 Dec 2005 03:26:28 +0000 (03:26 -0000)
* WebConfigurationSettings.cs: patch by Cyrille Colin that sets the
right application path even when MapPath fails. Closes bug #77044.

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

mcs/class/System.Web/System.Web.Configuration/ChangeLog
mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs

index 4e38126f2e66954e15bde326477e94876c8b375b..72878fdac892d9bc542d5b1674630b7da9d3c066 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * WebConfigurationSettings.cs: patch by Cyrille Colin that sets the
+       right application path even when MapPath fails. Closes bug #77044.
+
 2005-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * WebConfigurationSettings.cs: don't fail if <location> has more
index 2f2ba17a07d21018c4e56e98a4a74ff5ac1cdf0d..81584de3b8b4560f97107ca9904fe93db501dd6a 100644 (file)
@@ -210,7 +210,12 @@ namespace System.Web.Configuration
                        if (data != null)
                                return data;
 
-                       string realpath = context.Request.MapPath (dir);
+                       string realpath = null;
+                       try {
+                               realpath = context.Request.MapPath (dir);
+                       } catch {
+                               realpath = context.Request.MapPath (HttpRuntime.AppDomainAppVirtualPath);
+                       }
                        string lower = Path.Combine (realpath, "web.config");
                        bool isLower = File.Exists (lower);
                        string wcfile = null;