Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Practical examples of Try/Catch/Finally
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00836428
Message ID:
00837042
Views:
34
>>What happened when I tried it yesterday, the exception handling in Application_Error catches the error when user enters wrong URL. Therefore, the page 404b.htm never gets displayed. And I don't know how to make Application_Error ignore some errors.
>>
>
>You are right. Processing goes through Application_Error.
>
>You can redirect certain error codes in web.config
>
>
><customErrors defaultRedirect="~/RecordSearchForm.aspx" mode="On">
>     <error statusCode="404" redirect="~/RecordSearchForm.aspx" />
></customErrors>
>
Sorry to say but it does not work. Exception handling in Application_Error comes before the error defined in web.config. So we are back to dealing with it in Application_Error.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform