title: WCF Web.config - The configuration section 'system.webserver' cannot be read because it is missing a section declaration
body: <p>I'm on Visual Studio 2010 and Target is 4.0. What's wrong with this web.config?</p>
  
  <p>I'm getting 500 error on local web server: 
  The configuration section 'system.webserver' cannot be read because it is missing a section declaration </p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
      &lt;system.web&gt;
          &lt;compilation debug="true" targetframework="4.0"&gt;
              &lt;authentication mode="None"&gt;
              &lt;/authentication&gt;
          &lt;/compilation&gt;
      &lt;/system.web&gt;
      &lt;system.webserver&gt;
          &lt;modules runallmanagedmodulesforallrequests="true"&gt;
          &lt;/modules&gt;
      &lt;/system.webserver&gt;
      &lt;system.servicemodel&gt;
          &lt;servicehostingenvironment aspnetcompatibilityenabled="true"&gt;
              &lt;standardendpoints&gt;
                  &lt;webscriptendpoint&gt;
                      &lt;standardendpoint crossdomainscriptaccessenabled="true"&gt;
                      &lt;/standardendpoint&gt;
                  &lt;/webscriptendpoint&gt;
              &lt;/standardendpoints&gt;
          &lt;/servicehostingenvironment&gt;
      &lt;/system.servicemodel&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>It's giving me these warnings in VS:</p>
  
  <p>Warning 1   p:\jcp\WCF1\WCF1\Service1.svc: ASP.NET runtime error: Unrecognized configuration section system.webserver. (p:\jcp\WCF1\WCF1\web.config line 9) p:\jcp\WCF1\WCF1\Service1.svc   1   1   WCF1</p>
  
  <p>Warning 2   The 'targetframework' attribute is not allowed. p:\jcp\WCF1\WCF1\Web.config 4   29  WCF1</p>
  
  <p>Warning 3   The element 'compilation' has invalid child element 'authentication'. List of possible elements expected: 'assemblies, buildProviders, codeSubDirectories, expressionBuilders, folderLevelBuildProviders'.  p:\jcp\WCF1\WCF1\Web.config 5   5   WCF1</p>
  
  <p>I've set my project to use local IIS and created on virtual. My client is Windows 7 pro with iis7 and the apppool for the folder is set to 4.0.  Do I need .net 3.5 installed on the client?</p>