title: Custom errors not working in my MVC 4 app
body: <p>I have custom errors enabled in my app. The web config has an entry as follows:</p>
  
  <pre><code>&lt;customErrors mode="On" defaultRedirect="~/Views/Shared/Error.cshtml"&gt;
    &lt;error statusCode="403" redirect="~/Views/Shared/UnauthorizedAccess.cshtml"/&gt;
    &lt;error statusCode="404" redirect="~/Views/Shared/FileNotFound.cshtml"/&gt;
  &lt;/customErrors&gt;
  </code></pre>
  
  <p>I also have the <code>HandleError</code> attribute applied as a global action filter. My <code>FilterConfig</code> reads as follows:</p>
  
  <pre><code>public static void RegisterGlobalFilters(GlobalFilterCollection filters)
          {
              filters.Add(new HandleErrorAttribute());
          }
  </code></pre>
  
  <p>Further, there is the default <code>Error.cshtml</code> defined in the <code>~/Views/Shared</code> folder.</p>
  
  <p>Yet, my application displays that ugly default error page of IE.</p>
  
  <p><strong>Update</strong></p>
  
  <p>I checked that the custom error pages are showing up fine in all other browsers except IE. What's the deal here?</p>
  
  <p><strong>Further Update</strong></p>
  
  <p>Just found this article. <a href="http://perishablepress.com/important-note-for-your-custom-error-pages/" rel="noreferrer">http://perishablepress.com/important-note-for-your-custom-error-pages/</a></p>
  
  <p>It says that IE wants custom error pages to be at least 512 bytes in size. If your custom error page is less than that size, it'll throw up its own ugly error page.</p>
  
  <p><strong>Latest Update</strong>
  Everything works now that I've increased the payload of my error pages. However, only the default Error.cshtml page shows up for unhandled exceptions. For the other status codes, I get an ASP.NET 404 saying that it could not find my custom error page in the location I have specified in the web.config file. I do have the custom error pages and they have the exact names I have specified in the web.config.</p>