Rss Feed Like Us on facebook Google Plus

June 15, 2013

Setup Custom Error Page for 404 Page Not Found :ASP.NET

To set up custom error page in you have to just add a custom error code in
web.config file for aspx pages.and for Non aspx pages like html,php,jsp or only strings after url, you have to add httperrors code to web.config file.

 >> Add below codes in <configuration> Tag in web.config

For Aspx Pages

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

For Non-Aspx pages

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

you can design your 404 page using these links

© 2011-2016 Techimpulsion All Rights Reserved.

The content is copyrighted to Tech Impulsion and may not be reproduced on other websites.