0

I have created Web API only. In that I want to use Elmah Logging. I have installed Nuget package of it. But when I try to access Elmah.axd file from browser it gives me an error : 404 Not Found. And that file is not generated. I have followed this link.

Do I need to do anything additional to generate/access this file?

Ankita
  • 1,416
  • 4
  • 17
  • 42

1 Answers1

0

I'm the author of the tutorial you have linked to. I just created a new Web API project and installed ELMAH. /elmah.axd is available. I would be very interested in seeing your web.config if you can update the question with that? Also, you can try to validate your web.config using the ELMAH Configuration Validator here: https://elmah.io/tools/configvalidator

ThomasArdal
  • 4,999
  • 4
  • 33
  • 73
  • It is working fine now. I have installed another package Elmah.contrib.Webapi and it worked for me. – Ankita Jul 07 '16 at 07:04
  • One more thing I found to keep older error logs in axd file. I do not know how it works. But I have created one folder named ErrorLog. And it works fine. I do not know whether you have mention this in your article or not. But this is good. – Ankita Jul 07 '16 at 07:09
  • /elmah.axd should work out of the box when installing ELMAH. Elmah.Contrib.WebApi is for logging errors from Web API and don't have anything to do with /elmah.axd. – ThomasArdal Jul 07 '16 at 07:13
  • Okay. Thanks for the clarification. – Ankita Jul 07 '16 at 07:47