Add broken mono configuration hack
authorMarek Safar <marek.safar@gmail.com>
Wed, 13 May 2015 15:27:08 +0000 (17:27 +0200)
committerMarek Safar <marek.safar@gmail.com>
Mon, 2 May 2016 22:10:15 +0000 (00:10 +0200)
mcs/class/referencesource/System.Web.Services/System/Web/Services/Configuration/WsdlHelpGeneratorElement.cs

index 3ee89d0a741dba082f5ed375269b4c71107336de..c1e6007dfea16639fcc7bc751b4cc46f0a76154e 100644 (file)
@@ -71,6 +71,13 @@ namespace System.Web.Services.Configuration
 
             // Update paths
             // If we're not running in the context of a web application then skip this setting.
+#if MONO_BROKEN_CONFIGURATION_DLL
+                       try {
+                               var hack = this.EvaluationContext;
+                       } catch (ConfigurationErrorsException) {
+                               return;
+                       }
+#endif
             ContextInformation context = this.EvaluationContext;
             WebContext webContext = context.HostingContext as WebContext;
             if (webContext == null)
@@ -115,6 +122,14 @@ namespace System.Web.Services.Configuration
             PartialTrustHelpers.FailIfInPartialTrustOutsideAspNet();
 
             WsdlHelpGeneratorElement parent = (WsdlHelpGeneratorElement)parentElement;
+#if MONO_BROKEN_CONFIGURATION_DLL
+                       try {
+                               var hack = this.EvaluationContext;
+                       } catch (ConfigurationErrorsException) {
+                               base.Reset(parentElement);
+                               return;
+                       }
+#endif
             ContextInformation context = this.EvaluationContext;
             WebContext webContext = context.HostingContext as WebContext;
             if (webContext != null)