Install - .NET Core Agent Startup Parameters on Windows started as a Service for Dynamic Analysis
- .NET Core Compatibility
- Installation Workflow
- Sample contents of vmargs-example/windows-services file
.NET Core Compatibility
vFunction supports C# .NET Core version 3.x and .NET 6.x, 7.x and 8.x applications.
Installation Workflow
- Install the Dynamic Analysis Controller
- Open the vFunction .NET Core Windows Service startup parameters in a text editor
### Replace the REPLACE_BASE_DIR below with the actual value, such as C:\vfunction
### Replace the INSTANCE_NAME below with the actual value, such as default-dotnet
REPLACE_BASE_DIR\config\agent\instances\INSTANCE_NAME\vmargs-examples\windows-service - Open the Windows Server's Registry Editor
- Open the Start Menu
- Search for regedit
- Launch the Registry Editor
- In the left-hand sidebar, expand the folders to get to Application
### Replace the SERVICE_NAME below with the name of the Windows Service for the Application
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SERVICE_NAME - Right-click in the white space below the list of Registry Keys for the Service
- Select New > >Multi-String Value
- Replace New Value #1 with
Environment
- Double-click the new
Environment
variable to add Value Data entries - Copy-and-paste all of the Value Data strings from your text editor (from Step #2) into the Edit Multi-String Value Data text box
- Click the OK button
- Restart the Windows Service
- Confirm that the Application comes up and functions as expected
- If any issues arise:
Sample contents of vmargs-example/windows-services file
Open the sample file in:
### Replace the REPLACE_BASE_DIR below with the actual values, such as C:\vfunction\
REPLACE_BASE_DIR\controller-installation\stuff\agent\vmargs-examples\dotnet\dotnet\windows-services
The contents of this sample file are below:
### Replace the REPLACE_BASE_DIR below with the actual values, such as C:\vfunction\
### Replace the REPLACE_INSTANCE below with the actual values, such as default-dotnet
Each windows service has a key in the registry at:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<ServiceName>.
Under this key, we can set a multi string value called Environment and add all the relevant vars to it:
Value Name:
Environment
Value Data:
VF_AGENT_CONF_LOCATION=REPLACE_BASE_DIR\config\agent\instances\REPLACE_INSTANCE\conf.json
CORECLR_PROFILER_PATH_64=REPLACE_BASE_DIR\agent\vfagent.net.dll
CORECLR_PROFILER_PATH_32=REPLACE_BASE_DIR\agent\vfagent.net.x86.dll
CORECLR_ENABLE_PROFILING=1
CORECLR_PROFILER={cd7d4b53-96c8-4552-9c11-6e41df8eab8a}
DOTNET_TailCallOpt=0
Or, alternatively. once the install script is run, the relevant placeholder fields in the file are replaced in the version of the environmentally-specific file in:
### Replace the REPLACE_BASE_DIR below with the actual values, such as C:\vfunction\
### Replace the INSTANCE_NAME below with the actual values, such as default-dotnet
REPLACE_BASE_DIR\config\agent\instances\INSTANCE_NAME\vmargs-examples\windows-services