[.Net] Are nested web.config files supported in .NET for the agent NewRelic.AppName parameter?

Hi Everyone,

We are in the process of evaluating New Relic for a .NET application that has two web.config files nested, one for the parent application and one for the child application. The parent application is ASP.NET and the child is a .net WEB.API. I noticed that when setting the AppName in the web.config of the parent it doesn’t show traces from the API app. Each of the two apps has its own web.config. When I added a different AppName in the web.config of the child app those traces are not coming through to the APM either. Am I doing something wrong?

Thank you.

@Monitor5654 Welcome to the community! :slight_smile: Want to make sure you are aware of this .Net Troubleshooting Framework Configuration that may provide some help. Hoping our community members and support team will also be able to lend their expertise.

Thank you for the reply.

I read the .NET configuration post, but it is not clear as to what happens if a web.config file is nested. Perhaps that’s not supported? In terms of precedence it would be like this:

web.config (at root level of the application) AppName = X
–> web.config (at a subdirectory level of the application) AppName =Y

Based on my testing it appears that neither X nor Y is tracking the traces of the application under Y.

Hello @Monitor5654,

I did some testing on this by adding an application to an existing web site in IIS, and adding…

   <add key = "NewRelic.AppName" value ="Descriptive Name" />

…to the nested web.config, which is located in the subfolder of the parent web site.

The agent was able to name the nested application based on that value which also shows up in the logs:

Application name from web.config or app.config.

Can you confirm that traffic is hitting the child application, and are you getting profiler logs for the child application?