title: How to open a SectionGroup in an ASP.NET web application?
body: <p>I have a small ASP.NET web application hosted in an integration test (executing within NUnit).  My product code can usually find configuration data from the web.config or app.config file, but for some reason when hosting ASP.NET I seem to get an <code>ArgumentException</code> when executing the first of these commands: </p>
  
  <pre><code>var configuration = ConfigurationManager.OpenExeConfiguration(null);
  return configuration.GetSectionGroup(SectionGroupName);
  </code></pre>
  
  <blockquote>
    <p>exePath must be specified when not running inside a stand alone exe.</p>
  </blockquote>
  
  <p>I don't know what to put here.  There isn't a sensible exePath for my product to ever pass into this method as a parameter as it usually runs within a web server.  Also, ordinary Sections (not SectionGroups) can typically be opened using:</p>
  
  <pre><code>ConfigurationManager.GetSection(SectionName)
  </code></pre>
  
  <p>even within unit tests this works, where an App.config file somehow magically gets read.  That's what I'd like when reading SectionGroups.</p>
  
  <p>Any ideas?</p>