NickCraver / StackExchange.Exceptional

Error handler used for the Stack Exchange network
https://nickcraver.com/StackExchange.Exceptional/
Apache License 2.0
862 stars 170 forks source link

Not catching Soap/WebAPI exceptions #74

Closed itssimple closed 7 years ago

itssimple commented 8 years ago

It seems that Exceptional is not catching the exceptions thrown by WebAPI-controllers or Soap Webservices.

Callstack for WebAPI-exception is like this:

at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary'2 arguments, CancellationToken cancellationToken) I have no current example of soap-webservice (but they aren't that important any longer)

AlexSikilinda commented 7 years ago

@itssimple, try adding runAllManagedModulesForAllRequests="true" to web.config when you add error handler:

<modules runAllManagedModulesForAllRequests="true">
    <add name="ErrorLog" type="StackExchange.Exceptional.ExceptionalModule, StackExchange.Exceptional" />
</modules>
NickCraver commented 7 years ago

What @AlexSikilinda suggest is correct - let me know if this doesn't resolve and I'll reopen :)