<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>I am getting an error when using any class that relies on machine.config settings in MonoMac; for instance, when executing:</div>
<div><br>
</div>
<div>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco"><span style="color: #2b996f">var</span> request = (HttpWebRequest) WebRequest.Create(<span style="color: #ff45f5">&quot;http://www.google.com&quot;</span>);</p>
</div>
<div><br>
</div>
<div>I immediately get the following error:</div>
<div><br>
</div>
<div>[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for System.Net.WebRequest ---&gt; System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. ---&gt; System.MissingMethodException:
 Default constructor not found for type System.Configuration.ExeConfigurationHost.</div>
<div>8/25/11 5:50:31 AM<span class="Apple-tab-span" style="white-space:pre"> </span>
[0x0-0x63063].com.yourcompany.Test123[1098]<span class="Apple-tab-span" style="white-space:pre">
</span>&nbsp;at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in &lt;filename unknown&gt;:0&nbsp;</div>
<div>8/25/11 5:50:31 AM<span class="Apple-tab-span" style="white-space:pre"> </span>
[0x0-0x63063].com.yourcompany.Test123[1098]<span class="Apple-tab-span" style="white-space:pre">
</span>&nbsp;at System.Activator.CreateInstance (System.Type type) [0x00000] in &lt;filename unknown&gt;:0&nbsp;</div>
<div>8/25/11 5:50:31 AM<span class="Apple-tab-span" style="white-space:pre"> </span>
[0x0-0x63063].com.yourcompany.Test123[1098]<span class="Apple-tab-span" style="white-space:pre">
</span>&nbsp;at System.Configuration.InternalConfigurationSystem.Init (System.Type typeConfigHost, System.Object[] hostInitParams) [0x00000] in &lt;filename unknown&gt;:0&nbsp;</div>
<div>8/25/11 5:50:31 AM<span class="Apple-tab-span" style="white-space:pre"> </span>
[0x0-0x63063].com.yourcompany.Test123[1098]<span class="Apple-tab-span" style="white-space:pre">
</span>&nbsp;at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) [0x00000] in &lt;filename unknown&gt;:0&nbsp;</div>
<div>8/25/11 5:50:31 AM<span class="Apple-tab-span" style="white-space:pre"> </span>
[0x0-0x63063].com.yourcompany.Test123[1098]<span class="Apple-tab-span" style="white-space:pre">
</span>&nbsp;at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel userLevel, System.Reflection.Assembly calling_assembly, System.String exePath) [0x00000] in &lt;filename unknown&gt;:0&nbsp;</div>
<div>8/25/11 5:50:31 AM<span class="Apple-tab-span" style="white-space:pre"> </span>
[0x0-0x63063].com.yourcompany.Test123[1098]<span class="Apple-tab-span" style="white-space:pre">
</span>&nbsp;at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in &lt;filename unknown&gt;:0&nbsp;</div>
<div><br>
</div>
<div>I am using the latest and greatest versions: 2.10.5 and MonoDevelop 2.4.2. Ive also tried using MonoDevelop 2.6 RC1 and I get the same error.</div>
<div><br>
</div>
<div>Please help!</div>
</body>
</html>