Is it possible to configure ELMAH with ASP.NET vNext? If so, how?
I am lost as to where even start, given there's not even a web.config anymore. If anyone has or can figure it out, please share with us.
Thank you
ELMAH doesn't support ASP.NET Core.
There are two options by using ELMAH to capture exceptions in WEB API. If you want to capture errors that are encountered in Actions and Controllers , i.e. in your business logic you can create a ActionFilterAttribute and log those exceptions to ELMAH. Then wireup by adding that filter.
Elmah (which stands for Error Logging Modules and Handlers) is a pluggable error management framework. Because Elmah can be used to attach error logging capabilities to your application without having to re-compile or re-deploy, it makes the process of detecting application errors almost seamless.
ELMAH does not work with ASP.NET 5 because ELMAH (given its name) is based on ASP.NET 4.x's Modules and Handlers (the "MAH" of "ELMAH").
In ASP.NET 5 the replacement for modules and handlers is called middleware.
There is a prototype in ASP.NET 5 called "ELM" (Error Logging Middleware) that has some features similar to ELMAH. You can check out a sample here: https://github.com/aspnet/Entropy/tree/dev/samples/Logging.Elm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With