locked
setup 404 error page in web.config RRS feed

  • Question

  • User1519602350 posted

    please help me out to setp 404 error page web.config

    Thursday, October 30, 2014 6:10 AM

Answers

All replies

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 30, 2014 6:15 AM
  • User-1980594115 posted

    Include the following in web.config and create your 404.cshtml page:

    <customErrors mode="On">
         <error statusCode="404" redirect="404.cshtml" />
    </customErrors>
    

    Thursday, October 30, 2014 11:05 AM
  • User1308270069 posted
    <customErrors defaultRedirect="~/Error/Error.htm" mode="on">
          <error statusCode="500" redirect="~/Error/error.htm" />
          <error statusCode="404" redirect="~/Error/filenotfound.htm" />
          <error statusCode="403" redirect="~/Error/forbidden.htm" />
          <error statusCode="400" redirect="~/Error/400badrequest.cshtml" />
          <error statusCode="401" redirect="~/Error/401Unauthorizederror.htm" />
    </customErrors>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 30, 2014 2:36 PM