What to do to troubleshoot the .NET Agent when metrics do not appear in the Workstation and you have completed the following steps:

Check the Core profile environment variables.

Exercise the application and verify that it is a .NET app residing on same server as IIS.

Load the w3wp process.

Restart the IIS web server.

Check the windows log and seeing no events.

Solution:

Sometimes, the svchost process running windows services does not retrieve the cor profiler and CLS ID environment variables from the system. Svchost spawns the w3wp process and must obtain these environment variables for successful operation.

In addition, wily.Agent.dll will not load with w3wp if the needed environment variables are not retrieved .

Using the "set" command may show these environment variables present, but it does not guarantee that svchost (the windows service) will retrieve them, or deliver to w3wp once deployed. You will also not see wily.Agent.dll loaded with w3wp if the necessary environment variables are not retrieved.

Usually, doing the following steps resolve this issue:

Check the svchost process in the Task Manager and locate the instance spawning w3wp.

Then kill or restart this process.

Then svchost can then retrieve the environment variables, w3wp can load wily.Agent.dll, and metrics should appear in the Investigator.