Custom Error Page In ASP.Net

Posted by Dotnetrajanikanth under ASP.NET on 5/17/2012 | Points: 10 | Views : 1304 | Status : [Member] | Replies : 2
<customErrors mode="On" defaultRedirect="~/ErrorPages/Error.aspx" redirectMode ="ResponseRedirect" > <error statusCode ="400" redirect ="~/ErrorPages/400Error.aspx" /> <error statusCode ="404" redirect ="~/ErrorPages/404Error.aspx" /> </customErrors>

For the above code error code 400's custom error page is not getting displayed where as i am able to get the corresponding custom error for 404 error...

____________
www.flickr.com/photos/psdesigner/



Responses

Posted by: Vuyiswamb on: 5/17/2012 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
Few days ago i had the same problem. but yours looks easly, can you give us more info on your problem

Thank you for posting at Dotnetfunda
[Administrator]

Dotnetrajanikanth, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Dotnetrajanikanth on: 5/18/2012 [Member] Starter | Points: 25

Up
0
Down
<customErrors mode="On" defaultRedirect="~/ErrorPages/Error.aspx" redirectMode ="ResponseRedirect" > 

<error statusCode ="400" redirect ="~/ErrorPages/400Error.aspx" />
<error statusCode ="404" redirect ="~/ErrorPages/404Error.aspx" />
</customErrors>


The code that i have used is the above one...

i am using dotnet framework 3.5 visual studio 2008 no IIS

the custom error page for 404 is appering properly... but for 400 it is displaying the normal asp.net 400 error page.


____________
www.flickr.com/photos/psdesigner/

Dotnetrajanikanth, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response