Author: toshok
Date: 2006-06-08 10:50:38 -0400 (Thu, 08 Jun 2006)
New Revision: 61574

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-06-08  Chris Toshok  <[EMAIL PROTECTED]>

        * WebConfigurationHost.cs (InitForConfiguration): i know this is
        going to bite me in the ass, but guard against configPath being ==
        to "/", since this will result in an infinite loop.
        (MapPath): fix a NRE.



Modified: trunk/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog   
2006-06-08 14:49:54 UTC (rev 61573)
+++ trunk/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog   
2006-06-08 14:50:38 UTC (rev 61574)
@@ -1,3 +1,10 @@
+2006-06-08  Chris Toshok  <[EMAIL PROTECTED]>
+
+       * WebConfigurationHost.cs (InitForConfiguration): i know this is
+       going to bite me in the ass, but guard against configPath being ==
+       to "/", since this will result in an infinite loop.
+       (MapPath): fix a NRE.
+
 2006-05-18  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
        * WebConfigurationManager.cs: recent sys.config.dll changes on

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-06-08 14:49:54 UTC (rev 61573)
+++ 
trunk/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs 
    2006-06-08 14:50:38 UTC (rev 61574)
@@ -171,7 +171,8 @@
                                else
                                        configPath = locationSubPath;
 
-                               if (configPath == 
HttpRuntime.AppDomainAppVirtualPath)
+                               if (configPath == 
HttpRuntime.AppDomainAppVirtualPath
+                                   || configPath == "/")
                                        i = -1;
                                else
                                        i = configPath.LastIndexOf ("/");
@@ -202,7 +203,7 @@
                        else if (HttpContext.Current != null
                                 && HttpContext.Current.Request != null)
                                return HttpContext.Current.Request.MapPath 
(virtualPath);
-                       else if (virtualPath.StartsWith 
(HttpRuntime.AppDomainAppVirtualPath)) {
+                       else if (HttpRuntime.AppDomainAppVirtualPath != null && 
virtualPath.StartsWith (HttpRuntime.AppDomainAppVirtualPath)) {
                                if (virtualPath == 
HttpRuntime.AppDomainAppVirtualPath)
                                        return HttpRuntime.AppDomainAppPath;
                                return UrlUtils.Combine 
(HttpRuntime.AppDomainAppPath, virtualPath.Substring 
(HttpRuntime.AppDomainAppVirtualPath.Length));

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

Reply via email to