customErrors和httpErrors的区别 [ASP.NET-MVC]
The customErrors attribute is used when the .net code is throwing an exception (404, 403, 500 etc) and 
the httpErrors attribute is used when IIS itself is throwing an exception.
So for example I have a simple mvc web application, I define the following config:
    <customErrors mode="On" defaultRedirect="Error.html">
        <error statusCode="403" redirect="/Error403" />
        <error statusCode="404" redirect="/Error404" />
        <error statusCode="500" redirect="/Error500" />
  <httpErrors errorMode="Custom" existingResponse="Auto" defaultResponseMode="ExecuteURL" >
    <remove statusCode="403"/>
    <remove statusCode="404"/>
    <remove statusCode="500"/>
    <error statusCode="403" responseMode="ExecuteURL" path="/Error403" />
    <error statusCode="404" responseMode="ExecuteURL" path="/Error404" />
    <error statusCode="500" responseMode="ExecuteURL" path="/Error500" />

来源: <>