in my web.config file to show specific error
pages -
under <system.web> add -
<customErrors defaultRedirect="error.html" mode="On">
<error statusCode="500" redirect="server_error.html"/>
<error statusCode="403" redirect="error_noaccess.html"/>
<error statusCode="404" redirect="error_filenotfound.html"/>
</customErrors>
There are 3 error modes on which ASP.NET application works:
Off Mode,On Mode,RemoteOnly Mode
here i used On mode to show specific error page according
to statusCode.if you use Off mode then asp.net default
error pages shown.