Guest User

Untitled

a guest
Dec 10th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. public void ErrorMail_Filtering(object sender, ExceptionFilterEventArgs args)
  2. {
  3. Filter404Errors(args);
  4. }
  5.  
  6. private void Filter404Errors(ExceptionFilterEventArgs args)
  7. {
  8. if (args.Exception.GetBaseException() is HttpException)
  9. {
  10. var httpException = args.Exception.GetBaseException() as HttpException;
  11. if (httpException != null && httpException.GetHttpCode() == 404)
  12. args.Dismiss();
  13. }
  14. }
Add Comment
Please, Sign In to add comment