2008-04-18 Marek Habersack <mhabersack@novell.com>
authorMarek Habersack <grendel@twistedcode.net>
Fri, 18 Apr 2008 20:00:19 +0000 (20:00 -0000)
committerMarek Habersack <grendel@twistedcode.net>
Fri, 18 Apr 2008 20:00:19 +0000 (20:00 -0000)
* CompilationSection.cs: when ASP.NET is self-hosted, force
non-batch compilation. Fixes bug #380985

svn path=/trunk/mcs/; revision=101158

mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
mcs/class/System.Web/System.Web.Configuration_2.0/CompilationSection.cs

index 770a25d6201aafb3d361177ae5f50ec378cabfc0..19842f4b93866b7d8715c3875e50686a744ebe4f 100644 (file)
@@ -1,3 +1,8 @@
+2008-04-18  Marek Habersack  <mhabersack@novell.com>
+
+       * CompilationSection.cs: when ASP.NET is self-hosted, force
+       non-batch compilation. Fixes bug #380985
+
 2008-03-23  Dean Brettle <dean@brettle.com>
 
        * CapabilitiesBuild.cs (Process), ICapabilitiesProcess.cs (Process),
index dabde575d10806c25f14ce9f4fcc32ba17470ef5..601e7901e9b6957edc6b0b8a3da68016399aeabc 100644 (file)
@@ -55,7 +55,8 @@ namespace System.Web.Configuration
                static ConfigurationProperty expressionBuildersProp;
                static ConfigurationProperty urlLinePragmasProp;
                static ConfigurationProperty codeSubDirectoriesProp;
-
+               static bool hosted;
+               
                static CompilationSection ()
                {
                        assembliesProp = new ConfigurationProperty ("assemblies", typeof (AssemblyCollection), null,
@@ -111,6 +112,9 @@ namespace System.Web.Configuration
                        properties.Add (strictProp);
                        properties.Add (tempDirectoryProp);
                        properties.Add (urlLinePragmasProp);
+
+                       AppDomain domain = AppDomain.CurrentDomain;
+                       hosted = (domain.GetData (ApplicationHost.MonoHostedDataKey) as string) == "yes";
                }
 
                public CompilationSection ()
@@ -141,7 +145,12 @@ namespace System.Web.Configuration
 
                [ConfigurationProperty ("batch", DefaultValue = "True")]
                public bool Batch {
-                       get { return (bool) base [batchProp]; }
+                       get {
+                               if (!hosted)
+                                       return false; // fix for bug #380985
+                               
+                               return (bool) base [batchProp];
+                       }
                        set { base [batchProp] = value; }
                }