How to instrument a standalone .NET application (does not run under IIS) so that it reports metrics with Custom Process Name.

Document ID : KB000045913
Last Modified Date : 14/02/2018
Show Technical Document Details


How to instrument a standalone .NET application (does not run under IIS) so that it reports metrics with Custom Process Name.



This example uses a simple .NET standalone Calculator application built with Visual Studio project file downloaded from here:

Windows Dev Center - Desktop > Samples > Simple Calculator

The executable name is MyCalculatorv1.exe

Detailed Steps:

1. Make a custom copy of the AGENT_HOME\wily\IntroscopeAgent.profile file as IntroscopeAgent_MyCalculator.profile and edit as follows:



2. Edit file MyCalculatorv1.exe.config as follows:

a. Open AGENT_HOME\wily\Sample.exe.config and copy all text between <configuration> & </configuration>

b. Paste into MyCalculatorv1.exe.config after the existing <startup> section

c. Modify these 2 lines to point to correct location of the agent profile and wily.Agent.dll file

            <add key="com.wily.introscope.agentProfile" value="C:\\AGENT_HOME\\wily\\IntroscopeAgent_MyCalculator.profile" />


d. The  <runtime> section for specifying wily.Agent.dll is not required and can be removed

3. Start the application MyCalculatorv1.exe and data should be seen in the Investigator under Custom Process Name MyCalculator


Log files will also appear in the AGENT_HOME\\wily\logs directory




Additional Information:

a. Files for above


b. Documentation references:

Implementing Agents > NET Agent > Customizing Instrumentation > Modifying the default instrumentation > Instrument processes and applications that run outside of IIS  NOTE: There is no need to set "introscope.agent.dotnet.runInRestrictedMode=false" as its default value is false (What's meaning of the property introscope.agent.dotnet.runInRestrictedMode)

Implementing Agents > NET Agent > Application-Specific Configuration

File Attachments: