ASP.NET Web API IExceptionLogger doesn't catch exceptions

前端 未结 1 1418
遇见更好的自我
遇见更好的自我 2021-01-04 03:25

I\'m trying to setup a global exception handler as outlined here: Web API Global Error Handling. I\"ve setup a case where an exception gets thrown within a controller constr

1条回答
  •  执念已碎
    2021-01-04 03:49

    Turns out it was the ordering. In my startup class (not shown) I moved the call to my RegisterApiConfig method (above, in the OP) to before my call to UseWebApi and now it works.

    0 讨论(0)
提交回复
热议问题