[RESOLVED]setup 404 error page in web.config

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

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

<customErrors mode="On">
     <error statusCode="404" redirect="404.cshtml" />
</customErrors>
<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>

Leave a Reply