Author: mhabersack
Date: 2007-11-02 18:02:36 -0500 (Fri, 02 Nov 2007)
New Revision: 88756

Modified:
   trunk/mcs/class/System.Web/System.Web.Hosting/ApplicationHost.cs
   trunk/mcs/class/System.Web/System.Web.Hosting/ChangeLog
   trunk/mcs/class/System.Web/System.Web/ChangeLog
   trunk/mcs/class/System.Web/System.Web/HttpApplication.cs
   trunk/mcs/class/System.Web/System.Web/HttpRuntime.cs
   trunk/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs
   trunk/mcs/class/System.Web/Test/System.Web.Hosting/ChangeLog
Log:
2007-11-03  Marek Habersack  <[EMAIL PROTECTED]>

        * ApplicationHostTest.cs: adjust ConstructorTest for
        AppDomainSetup.PrivateBinPath changes.
2007-11-03  Marek Habersack  <[EMAIL PROTECTED]>

        * ApplicationHost.cs: AppDomainSetup.PrivateBinPath is a list of
        full paths on 2.0.
2007-11-03  Marek Habersack  <[EMAIL PROTECTED]>

        * HttpApplication.cs: removed unused internal PrivateBinPath
        property.

        * HttpRuntime.cs: BinDirectory returns a path that ends with the
        directory separator character.



Modified: trunk/mcs/class/System.Web/System.Web/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web/ChangeLog     2007-11-02 22:20:24 UTC 
(rev 88755)
+++ trunk/mcs/class/System.Web/System.Web/ChangeLog     2007-11-02 23:02:36 UTC 
(rev 88756)
@@ -1,3 +1,11 @@
+2007-11-03  Marek Habersack  <[EMAIL PROTECTED]>
+
+       * HttpApplication.cs: removed unused internal PrivateBinPath
+       property.
+
+       * HttpRuntime.cs: BinDirectory returns a path that ends with the
+       directory separator character.
+
 2007-11-02  Marek Habersack  <[EMAIL PROTECTED]>
 
        * HttpServerUtility.cs: in 2.0, Transfer is allowed only from

Modified: trunk/mcs/class/System.Web/System.Web/HttpApplication.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpApplication.cs    2007-11-02 
22:20:24 UTC (rev 88755)
+++ trunk/mcs/class/System.Web/System.Web/HttpApplication.cs    2007-11-02 
23:02:36 UTC (rev 88756)
@@ -1332,21 +1332,6 @@
                        }
                }
 #endregion
-
-               internal static IEnumerable PrivateBinPath
-               {
-                       get {
-                               AppDomainSetup setup = 
AppDomain.CurrentDomain.SetupInformation;
-                               string baseDir = setup.ApplicationBase;
-                               
-                               string pbp = setup.PrivateBinPath;
-                               if (pbp == null || pbp.Length == 0)
-                                       yield break;
-                               foreach (string d in pbp.Split 
(Path.PathSeparator))
-                                       yield return Path.Combine (baseDir, d);
-                       }
-               }
-
                internal static bool IsRunningOnWindows {
                         get {
                                PlatformID pid = 
Environment.OSVersion.Platform;        

Modified: trunk/mcs/class/System.Web/System.Web/HttpRuntime.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpRuntime.cs        2007-11-02 
22:20:24 UTC (rev 88755)
+++ trunk/mcs/class/System.Web/System.Web/HttpRuntime.cs        2007-11-02 
23:02:36 UTC (rev 88756)
@@ -227,7 +227,7 @@
                                        }
 
                                        if (_actual_bin_directory == null)
-                                               _actual_bin_directory = 
Path.Combine (mypath, "bin");
+                                               _actual_bin_directory = 
Path.Combine (mypath, "bin") + Path.DirectorySeparatorChar;
                                }
                                
                                if (SecurityManager.SecurityEnabled) {

Modified: trunk/mcs/class/System.Web/System.Web.Hosting/ApplicationHost.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Hosting/ApplicationHost.cs    
2007-11-02 22:20:24 UTC (rev 88755)
+++ trunk/mcs/class/System.Web/System.Web.Hosting/ApplicationHost.cs    
2007-11-02 23:02:36 UTC (rev 88756)
@@ -30,6 +30,7 @@
 using System.IO;
 using System.Security.Permissions;
 using System.Security.Policy;
+using System.Text;
 
 namespace System.Web.Hosting {
 
@@ -117,6 +118,19 @@
                        }
 #endif
                }
+
+               static string BuildPrivateBinPath (string physicalPath, 
string[] dirs)
+               {
+#if NET_2_0
+                       int len = dirs.Length;
+                       string[] ret = new string [len];
+                       for (int i = 0; i < len; i++)
+                               ret [i] = Path.Combine (physicalPath, dirs [i]);
+                       return String.Join (";", ret);
+#else
+                       return String.Join (";", dirs);
+#endif
+               }
                
                //
                // For further details see `Hosting the ASP.NET runtime'
@@ -158,7 +172,7 @@
                        if (Environment.GetEnvironmentVariable ("MONO_IOMAP") 
!= null || HttpApplication.IsRunningOnWindows)
                                setup.PrivateBinPath = "bin";
                        else
-                               setup.PrivateBinPath = String.Join (";", 
HttpApplication.BinDirs);
+                               setup.PrivateBinPath = BuildPrivateBinPath 
(physicalDir, HttpApplication.BinDirs);
                        setup.PrivateBinPathProbe = "*";
                        setup.ShadowCopyFiles = "true";
                        setup.ShadowCopyDirectories = setup.PrivateBinPath;

Modified: trunk/mcs/class/System.Web/System.Web.Hosting/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Hosting/ChangeLog     2007-11-02 
22:20:24 UTC (rev 88755)
+++ trunk/mcs/class/System.Web/System.Web.Hosting/ChangeLog     2007-11-02 
23:02:36 UTC (rev 88756)
@@ -1,3 +1,8 @@
+2007-11-03  Marek Habersack  <[EMAIL PROTECTED]>
+
+       * ApplicationHost.cs: AppDomainSetup.PrivateBinPath is a list of
+       full paths on 2.0.
+
 2007-10-24  Marek Habersack  <[EMAIL PROTECTED]>
 
        * ApplicationHost.cs: ignore exceptions resulting from the attempt

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs   
2007-11-02 22:20:24 UTC (rev 88755)
+++ trunk/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs   
2007-11-02 23:02:36 UTC (rev 88756)
@@ -169,7 +169,14 @@
                        Assert.AreEqual (null, setup.LicenseFile, "D8");
                        //Assert.AreEqual (LoaderOptimization.NotSpecified, 
setup.LoaderOptimization);
                        p ("LoaderOptimization is: ", setup.LoaderOptimization);
-                       Assert.AreEqual ("Bin;bin", setup.PrivateBinPath, "D9");
+                       Assert.AreEqual (
+#if NET_2_0
+                               String.Format ("{0}{1}Bin;{0}{1}bin", tb, 
Path.DirectorySeparatorChar),
+#else
+                               "Bin;bin",
+#endif
+                               setup.PrivateBinPath, "D9"
+                       );
                        Assert.AreEqual (setup.PrivateBinPathProbe, "*", "D10");
                        p ("ShadowCopyDirs: ", setup.ShadowCopyDirectories);
                        Assert.AreEqual (true, 
setup.ShadowCopyDirectories.EndsWith ("bin"), "D11");

Modified: trunk/mcs/class/System.Web/Test/System.Web.Hosting/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web.Hosting/ChangeLog        
2007-11-02 22:20:24 UTC (rev 88755)
+++ trunk/mcs/class/System.Web/Test/System.Web.Hosting/ChangeLog        
2007-11-02 23:02:36 UTC (rev 88756)
@@ -1,3 +1,8 @@
+2007-11-03  Marek Habersack  <[EMAIL PROTECTED]>
+
+       * ApplicationHostTest.cs: adjust ConstructorTest for
+       AppDomainSetup.PrivateBinPath changes.
+
 2007-08-24  Marek Habersack  <[EMAIL PROTECTED]>
 
        * ApplicationHostTest.cs: use ; as the separator in the

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

Reply via email to