title: Can't see real error message of an ASP.NET application?
body: <p>I have an almost blank ASP.NET website I've created (1 page). I've deliberately coded a divide by zero error on Page_Load. If the application pool is set to "ASP.NET 4.0 Pipeline: Integrated" then I do not see the page load error but instead I get: </p>
  
  <blockquote>
    <p>Runtime Error</p>
    
    <p>Description: An application error occurred on the server. The current
    custom error settings for this application prevent the details of the
    application error from being viewed.</p>
  </blockquote>
  
  <p>The folder <em>is</em> set to be an application in IIS and the correct web.config entries to show errors are present, but for some reason, I cannot get .NET to show me the correct error message unless I change the applciation pool to ASP.NET <strong>Classic</strong>. Why is the "classic" mode necessary? I'm pulling my hair out as all other sites on the same machine are working OK (IIS7) and yet any new site I create seems to have this same problem. </p>
  
  <p>Any idea what might be causing IIS to either not recognise this folder is an application or otherwise not display the correct error message?</p>
  
  <p>EDIT:
  Web.Config is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration&gt;
      &lt;system.web&gt;
          &lt;customErrors mode="Off" /&gt;
          &lt;compilation debug="true" targetFramework="4.0" /&gt;
      &lt;/system.web&gt;
  &lt;/configuration&gt;
  </code></pre>