ASP.NET MVC Global Error Handling with ELMAH - best practices -


i integrate elmah mvc4 application i'm having few issues:

  • if elmah redirects errors specific error page, need return success (eg update, delete, ...) user?

  • if elmah catches errors need handle errors (e.g. use try catchblocks) in code @ all?

  • is there best practise example somewhere how use elmah?

1) elmah redirects, have handle error pages in web.config (hot ot can here)

2) should. elmah logging unhandled exceptions. can log handled exceptions this:

try {     ..... } catch(exception ex)  {      elmah.errorsignal.fromcurrentcontext().raise(ex);  } 

3) there nice article on scott hanselman blog: elmah: error logging modules , handlers asp.net (and mvc too!)


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -