I have a simple ASP.NET MVC 3 website hosted in IIS 7.0 and am having difficulties displaying a custom http error page for a 404.13 http status code.
I have the following configuration in my Web.Config
<system.web>
<httpRuntime maxRequestLength="2048"/>
<customErrors mode="Off"/>
</system.web>
<system.webServer>
<httpErrors errorMode="Custom" existingResponse="Replace">
<clear/>
<error statusCode="404" subStatusCode="-1" path="/home/showerror" responseMode="ExecuteURL" />
<error statusCode="404" subStatusCode="13" path="/home/showerror" responseMode="ExecuteURL" />
</httpErrors>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1048576"/>
</requestFiltering>
</security>
</system.webServer>
When I navigate to a page that doesn't exist my error page is rendered correctly. However if I upload a file greater than 1MB I am presented with an empty 404 response. The url is never executed. If I change the responseMode to Redirect then the user is redirected correctly.