title: WCF and System.Configuration namespace
body: <p>I received an error when an referenced .NET Framework 2.0 assembly tried to execute the following line of code in an IIS hosted WCF service:</p>
  
  <p>Error Message:</p>
  
  <blockquote>
    <p>exePath must be specified when not
    running inside a stand alone exe.</p>
  </blockquote>
  
  <p>Source Code:</p>
  
  <pre><code>ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
  </code></pre>
  
  <p>Has anyone experienced this issue and do they know how to resolve it?</p>
  
  <p><b>EDIT:</b> My question is, what is the best way to open a configuration file (app.config and web.config) from a WCF service that is backwards compatible with a .NET 2.0 assembly?</p>