2
0
Эх сурвалжийг харах

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.


svn path=/trunk/mcs/; revision=88756
Marek Habersack 18 жил өмнө
parent
commit
33ee579205

+ 15 - 1
mcs/class/System.Web/System.Web.Hosting/ApplicationHost.cs

@@ -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 @@ namespace System.Web.Hosting {
 			}
 #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 @@ namespace System.Web.Hosting {
 			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;

+ 5 - 0
mcs/class/System.Web/System.Web.Hosting/ChangeLog

@@ -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

+ 8 - 0
mcs/class/System.Web/System.Web/ChangeLog

@@ -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

+ 0 - 15
mcs/class/System.Web/System.Web/HttpApplication.cs

@@ -1332,21 +1332,6 @@ namespace System.Web {
 			}
 		}
 #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;	

+ 1 - 1
mcs/class/System.Web/System.Web/HttpRuntime.cs

@@ -227,7 +227,7 @@ namespace System.Web {
 					}
 
 					if (_actual_bin_directory == null)
-						_actual_bin_directory = Path.Combine (mypath, "bin");
+						_actual_bin_directory = Path.Combine (mypath, "bin") + Path.DirectorySeparatorChar;
 				}
 				
 				if (SecurityManager.SecurityEnabled) {

+ 8 - 1
mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs

@@ -169,7 +169,14 @@ namespace MonoTests.System.Web.Hosting {
 			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");

+ 5 - 0
mcs/class/System.Web/Test/System.Web.Hosting/ChangeLog

@@ -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