Click here to Skip to main content
15,889,315 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<customerrors mode="On" defaultredirect="NotFound.aspx">
<error statuscode="404" redirect="NotFound.aspx">

when ever my web applicaitons getting error on different pages the default custom error pages shold show., i used above coding in web.config file but the notfound.aspx page not opening when error occurs
Posted

Define following in web.config file

<customerrors defaultredirect="~/******.aspx" mode="On"><br />
    <error statuscode="500" redirect="~/*****.aspx" /><br />
    <error statuscode="404" redirect="~/*****.aspx" /><br />
</customerrors><br />

[updated]
Thanks
Ashish
 
Share this answer
 
v4
Comments
Umapathi K 6-Aug-12 1:33am    
in your coding you mentioned redirecmode but in my web.config it not showing
Umapathi K 6-Aug-12 1:44am    
i am getting error in mode="On"
AshishChaudha 6-Aug-12 1:46am    
What error you are getting??
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900