title: Catch error caused by incorrect web.config
body: <p>I am looking for a way to catch an error caused by an incorrect web.config file.
  It looks like <code>void Application_Error(object sender, EventArgs ev)</code> is only called after validating the config file and is never reached.</p>
  
  <p>Example error:</p>
  
  <blockquote>
    <p>Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.</p>
  </blockquote>
  
  <p>This error happens when the application's App pool is set to framework 2.0 instead of 4.0</p>
  
  <p>When this error happens I want to redirect to a specific page with screenshots to explain how to change the App pool.</p>
  
  <p>Is it possible to catch this error in global.asax?</p>