When navigating to "/elmah.axd" it throws a 'Root Element is missing' error

120 views Asked by At

Posting this to resolve a question I couldn't find an answer to elsewhere.

I'm running "elmah" for error logging in a legacy .NET framework project. It works fine in all of my testing / production environments. However, navigating to it locally produces an XML error:

Root element is missing

within ProcessRequestMain, which seemed to be internal to elmah. Changing configuration didn't help, and I couldn't find a reference to this elsewhere, where it only didn't work locally.

1

There are 1 answers

0
Lovethenakedgun On

The solution was to navigate to my logPath directory specified in the errorLog section of the web.config. Poking around the generated XML logfiles, I found that for some reason, one or two of them were actually malformed. This meant I couldn't launch the /elmah.axd page at all, without it throwing that error, presumably generated when it tried to parse them to display the page.

Deleting the offending logfiles resolved the issue.