[Mono-osx] Urgent: Error Initializing the configuration system.

Juan Roman Escamilla juanroman at unosquare.com
Thu Aug 25 07:10:05 EDT 2011


I am getting an error when using any class that relies on machine.config settings in MonoMac; for instance, when executing:


var request = (HttpWebRequest) WebRequest.Create("http://www.google.com");

I immediately get the following error:

[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for System.Net.WebRequest ---> System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. ---> System.MissingMethodException: Default constructor not found for type System.Configuration.ExeConfigurationHost.
8/25/11 5:50:31 AM [0x0-0x63063].com.yourcompany.Test123[1098]  at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in <filename unknown>:0
8/25/11 5:50:31 AM [0x0-0x63063].com.yourcompany.Test123[1098]  at System.Activator.CreateInstance (System.Type type) [0x00000] in <filename unknown>:0
8/25/11 5:50:31 AM [0x0-0x63063].com.yourcompany.Test123[1098]  at System.Configuration.InternalConfigurationSystem.Init (System.Type typeConfigHost, System.Object[] hostInitParams) [0x00000] in <filename unknown>:0
8/25/11 5:50:31 AM [0x0-0x63063].com.yourcompany.Test123[1098]  at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) [0x00000] in <filename unknown>:0
8/25/11 5:50:31 AM [0x0-0x63063].com.yourcompany.Test123[1098]  at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel userLevel, System.Reflection.Assembly calling_assembly, System.String exePath) [0x00000] in <filename unknown>:0
8/25/11 5:50:31 AM [0x0-0x63063].com.yourcompany.Test123[1098]  at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in <filename unknown>:0

I am using the latest and greatest versions: 2.10.5 and MonoDevelop 2.4.2. I´ve also tried using MonoDevelop 2.6 RC1 and I get the same error.

Please help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20110825/e41096f5/attachment.html 


More information about the Mono-osx mailing list