Click here to Skip to main content
15,614,665 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I've a typical question regarding custom error page setting in asp.net

I just trying to display error page on entering wrong url. For that purpose I just set my custom error message in web.config file, with the code :-
XML
<customerrors mode="On">
      <error statuscode="404" redirect="~/Error404.aspx" />
    </customerrors>



This code is fine when I enter wrong url like this:-
http://localhost:21521/wdwkd ----- it opens my Error404.aspx file as i Expected and I m very happy for that :)

But now the problem is when I enter wrong url like this:-
http://localhost:21521/StudentWork.aspx/wdwkd ---- it not only display my Error404.aspx file but also it opens the StudentWork.aspx file with no image displayed as I used in it actually.
I don't want that :(. I want my actual Error404.aspx page to be displayed.

Can u help me, where I'm going to be wrong......
Posted
Updated 19-Aug-13 18:44pm
v3
Comments
binadi007 15-Oct-13 9:01am    
Still I'm not getting any answer regarding it :(

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