Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Relic Solution: Profiler Log Says "Exception thrown while attempting to parse configuration file"


#1

This post is part of a series of posts designed to guide you through troubleshooting common issues in the .NET agent. For more context, please see <Troubleshooting with .NET agent log files>. If you were linked here directly, you should also take a look at the post I just linked to in order to make sure you’re looking at the log files that represent the application you are trying to monitor.

The issue

  • The .NET agent profiler log for your application’s process contains the error message Exception thrown while attempting to parse main newrelic.config file or Exception thrown while attempting to parse configuration file.

What it means.

  • The .NET agent profiler is unable to read its main configuration file for some reason.
  • This almost always means there is a typo in your newrelic.config file that causes it not to validate.
  • For the .NET Framework agent, this file will be at C:\ProgramData\New Relic\.NET Agent\newrelic.config
  • For the .NET Core agent, this file will be in the directory where the agent was extracted on the system.

The solution

  • Validate the newrelic.config file against the newrelic.xsd file that came packaged with the agent. It should be in the same directory. There are many tools available both installed and online to validate an XML file against its XSD definitions.
  • If the formatting issue can’t be detected with the validation tool, reach out to support or ask in these forums.

Relic Solution: Common .NET Agent Profiler Log Issues