How to handle Error 500 from Web.Config file in ASP.Net

Last Reply on Aug 16, 2014 03:02 AM By EmadKhan

Posted on Aug 15, 2014 05:43 AM

how to deal with error pages ? for e.g this is my web.config file :

 <customErrors mode="RemoteOnly" defaultRedirect="ErrorPages/404.aspx" redirectMode="ResponseRedirect">

      <error statusCode="404" redirect="ErrorPages/404.aspx" />
      <error statusCode="500" redirect="ErrorPages/500.aspx" />


    <httpErrors errorMode="Custom" existingResponse="Auto">
      <remove statusCode="500" subStatusCode="-1" />
      <remove statusCode="404" subStatusCode="-1" />
      <error statusCode="404" path="ErrorPages/404.aspx" responseMode="Redirect" />
      <error statusCode="500" path="ErrorPages/500.aspx" responseMode="Redirect" />

now i only know about 400 , that it appears when page is not found .. but what about 500 ? 300 ? 200 ? ?? when these occurs and what they tell a developer to do ?

Posted on Aug 16, 2014 02:52 AM

Check this

Posted on Aug 16, 2014 03:02 AM

what i have understand is that


Custom Errors only till you are in development phase


Http Errors only when u are in IIS or deplyoment phase