Author: toshok
Date: 2006-04-25 17:39:33 -0400 (Tue, 25 Apr 2006)
New Revision: 59876

Modified:
   trunk/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
   
trunk/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs
Log:
2006-04-25  Chris Toshok  <[EMAIL PROTECTED]>

        * WebConfigurationHost.cs (InitForConfiguration): stop going up
        the virtual hierarchy once we reach the application's base virtual
        path.



Modified: trunk/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog   
2006-04-25 21:33:08 UTC (rev 59875)
+++ trunk/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog   
2006-04-25 21:39:33 UTC (rev 59876)
@@ -1,3 +1,9 @@
+2006-04-25  Chris Toshok  <[EMAIL PROTECTED]>
+
+       * WebConfigurationHost.cs (InitForConfiguration): stop going up
+       the virtual hierarchy once we reach the application's base virtual
+       path.
+
 2006-04-24  Chris Toshok  <[EMAIL PROTECTED]>
 
        * AuthorizationSection.cs (IsValidUser): fix a problem that

Modified: 
trunk/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs
===================================================================
--- 
trunk/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs 
    2006-04-25 21:33:08 UTC (rev 59875)
+++ 
trunk/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs 
    2006-04-25 21:39:33 UTC (rev 59876)
@@ -170,7 +170,15 @@
                                else
                                        configPath = locationSubPath;
 
-                               if (configPath == "/")
+                               string basedir = null;
+                               if (HttpContext.Current != null
+                                   && HttpContext.Current.Request != null)
+                                       basedir = 
HttpContext.Current.Request.ApplicationPath;
+
+                               if (basedir == null)
+                                       basedir = "/";
+
+                               if (configPath == basedir)
                                        i = -1;
                                else
                                        i = configPath.LastIndexOf ("/");

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to