title: Problem displaying custom error page in ASP.NET MVC 2
body: <p>This is customErrors section from my web.config file</p>
  
  <pre><code>&lt;customErrors mode="On"&gt;
    &lt;error statusCode="500" redirect="HTTP500.aspx" /&gt;
  &lt;/customErrors&gt;
  </code></pre>
  
  <p>HTTP500.aspx is the same as standard /Views/Shared/Error.aspx page.</p>
  
  <p>When I get HTTP 500 error I see this page:</p>
  
  <p>Server Error in '/' Application.</p>
  
  <p>Runtime Error 
  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>
  
  <p>Details: To enable the details of this specific error message to be viewable on the local server machine, please create a  tag within a "web.config" configuration file located in the root directory of the current web application. This  tag should then have its "mode" attribute set to "RemoteOnly". To enable the details to be viewable on remote machines, please set "mode" to "Off".</p>
  
  
  
  <p>
      
          
      
  </p>
  
  <p>Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's  configuration tag to point to a custom error page URL.</p>
  
  
  
  <p>
      
          
      
  </p>
  
  <p><br /></p>
  
  <p>But when I change the above customErrors section like this:</p>
  
  <pre><code>&lt;customErrors mode="On"&gt;
    &lt;error statusCode="500" redirect="HTTP500.htm" /&gt;
  &lt;/customErrors&gt;
  </code></pre>
  
  <p>then HTTP500.htm page is displayed when HTTP 500 error occurs.</p>
  
  <p>Why HTTP500.aspx page isn't displayed?</p>