Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs')
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs9
1 files changed, 4 insertions, 5 deletions
diff --git a/mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs
index 702239fd4ef..d5011f10bba 100644
--- a/mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs
@@ -70,11 +70,10 @@ namespace System.Web.Compilation
}
string lang = parser.Language;
-#if NET_2_0
- CompilationSection config = (CompilationSection)WebConfigurationManager.GetSection ("system.web/compilation");
+#if CONFIGURATION_2_0
+ CompilationSection config = (CompilationSection)WebConfigurationManager.GetWebApplicationSection ("system.web/compilation");
Compiler c = config.Compilers[lang];
- Type t = Type.GetType (c.Type, true);
- provider = Activator.CreateInstance (t) as CodeDomProvider;
+ provider = (c == null) ? null : c.Provider;
#else
CompilationConfiguration config;
config = CompilationConfiguration.GetInstance (parser.Context);
@@ -88,7 +87,7 @@ namespace System.Web.Compilation
compilerParameters = CachingCompiler.GetOptions (parser.Assemblies);
compilerParameters.IncludeDebugInformation = parser.Debug;
-#if NET_2_0
+#if CONFIGURATION_2_0
compilerParameters.CompilerOptions = c.CompilerOptions;
compilerParameters.WarningLevel = c.WarningLevel;
#else