Author: mhabersack
Date: 2007-04-05 07:23:18 -0400 (Thu, 05 Apr 2007)
New Revision: 75424
Modified:
trunk/mcs/class/System.Web/System.Web.Hosting/ApplicationHost.cs
trunk/mcs/class/System.Web/System.Web.Hosting/ChangeLog
Log:
2007-04-05 Marek Habersack <[EMAIL PROTECTED]>
* ApplicationHost.cs: make ApplicationName/domain id really
unique.
Modified: trunk/mcs/class/System.Web/System.Web.Hosting/ApplicationHost.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Hosting/ApplicationHost.cs
2007-04-05 11:08:54 UTC (rev 75423)
+++ trunk/mcs/class/System.Web/System.Web.Hosting/ApplicationHost.cs
2007-04-05 11:23:18 UTC (rev 75424)
@@ -104,11 +104,6 @@
throw new ArgumentNullException ("virtualDir");
Evidence evidence = new Evidence
(AppDomain.CurrentDomain.Evidence);
-
- //
- // Unique Domain ID
- //
- string domain_id = (virtualDir +
physicalDir).GetHashCode ().ToString ("x");
//
// Setup
@@ -118,7 +113,6 @@
setup.ApplicationBase = physicalDir;
setup.CachePath = null;
- setup.ApplicationName = domain_id;
setup.ConfigurationFile = FindWebConfig (physicalDir);
setup.DisallowCodeDownload = true;
string bin_path = GetBinPath (physicalDir);
@@ -129,6 +123,8 @@
string dynamic_dir = null;
string user = Environment.UserName;
+ int tempDirTag = 0;
+
for (int i = 0; ; i++){
string d = Path.Combine (Path.GetTempPath (),
String.Format ("{0}-temp-aspnet-{1:x}",
user, i));
@@ -139,11 +135,18 @@
CreateDirectory (stamp);
dynamic_dir = d;
Directory.Delete (stamp);
+ tempDirTag = i.GetHashCode ();
break;
} catch (UnauthorizedAccessException){
continue;
}
}
+ //
+ // Unique Domain ID
+ //
+ string domain_id = (virtualDir.GetHashCode () ^
physicalDir.GetHashCode () ^ tempDirTag).ToString ("x");
+
+ setup.ApplicationName = domain_id;
setup.DynamicBase = dynamic_dir;
CreateDirectory (setup.DynamicBase);
Modified: trunk/mcs/class/System.Web/System.Web.Hosting/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Hosting/ChangeLog 2007-04-05
11:08:54 UTC (rev 75423)
+++ trunk/mcs/class/System.Web/System.Web.Hosting/ChangeLog 2007-04-05
11:23:18 UTC (rev 75424)
@@ -1,3 +1,8 @@
+2007-04-05 Marek Habersack <[EMAIL PROTECTED]>
+
+ * ApplicationHost.cs: make ApplicationName/domain id really
+ unique.
+
2007-02-21 Marek Habersack <[EMAIL PROTECTED]>
* ApplicationHost.cs: support both Bin and bin directories, prefer
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches