vendredi 21 octobre 2016

ASP.NET MVC/WEB API Exception handling

I understand that there are multiple ways by which this can be achieved (try...catch...finally, OnException or ExceptionFilter) but my question is, can we just implement one strategy for controller and rest is OK?

What I mean to say is, say for example, I have an assembly "A" which is being called from my MVC application. now if I implement OnException for exception logging, will it take care all exceptions that are generated in assembly "A" and also in Controller? (Here we can assume that, the only way to access assembly "A" is by any action method from controller).

I just want to make sure by this is that MY ASP.NET application must not crash when hosted on IIS just because too many unhandled exceptions are generated. (The one that I don't know which will be ignore by OnException or ExceptionFilter)

Aucun commentaire:

Enregistrer un commentaire