title: Limit the number of config sections
body: <p>In ASP.NET, when creating a custom config section, how do I limit the number of a particular section that can be declared?</p>
  
  <p>For example, if in web.config, I repeat the appSettings section...</p>
  
  <pre><code>&lt;appSettings /&gt; 
  &lt;appSettings /&gt;
  </code></pre>
  
  <p>...I get an exception when the configuration loads.</p>
  
  <p>If I do the same with my section...</p>
  
  <pre><code>&lt;employer /&gt; 
  &lt;employer /&gt;
  </code></pre>
  
  <p>...it allows it, but I don't want it to.</p>
  
  <p>My section code (C#) looks like this:</p>
  
  <pre><code>    [ConfigurationProperty("employer", IsRequired = true)]
      public EmployerElement Employer
      {
          get
          {
              return (EmployerElement)this["employer"];
          }
          set
          { this["employer"] = value; }
      }
  </code></pre>
  
  <p>Any help appreciated, thanks.</p>