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:
00837159
Views:
44
I have not tried your approach yet but from reading it seems logical and should work. Even if it does not work, I thank you very much for taking the time to work with me on this problem. I am making baby steps in learning ASP.NET so I am slow <g>.

>I see where the two threads are merging. Anyway, this type of code works for me in Application_Error, although I don't know exactly why you would want to use it:
>
>Exception ErrorInfo = Server.GetLastError().GetBaseException();
>if (ErrorInfo is System.IO.FileNotFoundException)
>{
>//Here, you know it is a page not found error
>}
>
>
>>I do want to have my own custom 404 error page. But my point is that with the global error code in Application_Error, it is not possible. If user enters wrong URL, the error code in Application_Error has to handle it. It would be nice if the exception handling code in Application_Error could redirect error to the custom 404 page. But the error handling code in Application_Error does not knows that the error is caused by wrong URL or anything else.
>>
"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