I've installed the nuget package for Elmah.WebApi and elmah.Mvc, which is catching a lot of my errors. However I have a parallel foreach loop which is throwing an error and not being caught/logged by elmah.
I assumed the nuget packages would implement the classes and interface specified here: http://www.asp.net/web-api/overview/error-handling/web-api-global-error-handling
Is there an additional filter you need to apply to catch errors that occur in separate threads? I'm guessing the same applies when using async/await?
Here is my code:
Parallel.ForEach(serviceHeaders, new ParallelOptions() { MaxDegreeOfParallelism = 8 }, patientGroup =>
{
...
}