In ASP.NET how to identify/process 404 exceptions?

I need to handle 404 exceptions differently than all other types of them. What is the best way to identify those 404 exceptions (distinguish them from other exceptions)?

The problem is that there is no a special exception class for 404 errors, I get regular System.Web.HttpException with Message = "File does not exist."

Should I just use exception's message for it or is there a better way?

Thank you.

6
задан Alex Kovshovik 11 February 2011 в 03:55
поделиться