Install - .NET Startup Parameters for Framework Agent started on Windows as a Service for Dynamic Analysis


.NET Framework Compatibility

vFunction supports C# .NET Framework version 4.x applications.


Installation Workflow

  1. Install the Dynamic Analysis Controller
  2. Open the vFunction Framework Windows Service startup parameters in a text editor

    ### Replace the REPLACE_BASE_DIR and INSTANCE_NAME below with the actual values

    REPLACE_BASE_DIR\config\agent\instances\INSTANCE_NAME\vmargs-examples\windows-service
  3. Open the Windows Server's Registry Editor
    • Open the Start Menu
    • Search for regedit
    • Launch the Registry Editor
  4. 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
  5. Right-click in the white space below the list of Registry Keys for the Service
  6. Select New > >Multi-String Value
  7. Replace New Value #1 with Environment
  8. Double-click the new Environment variable to add Value Data entries
  9. Copy-and-paste all of the Value Data strings from your text editor (that is pointing toREPLACE_BASE_DIR\config\agent\instances\INSTANCE_NAME\vmargs-examples\windows-service) into the Edit Multi-String Value Data text box
  10. Click the OK button
  11. Restart the Windows Service
  12. Confirm that the Application comes up and functions as expected
  13. If any issues arise:

Sample contents of vmargs-example/windows-services file

If using this sample below, you will need to:

  1. Find-and-replace the REPLACE_BASE_DIR with the value relevant to your vFunction installation
  2. Find-and-replace the REPLACE_INSTANCE with the value relevant to your vFunction installation

This sample file can be found in REPLACE_BASE_DIR\controller-installation\stuff\agent\vmargs-examples\dotnet\framework\windows-services. Once the install.sh script is run, the relevant placeholder fields are replaced in the version of the environmentally-specific file in REPLACE_BASE_DIR\config\agent\instances\INSTANCE_NAME\vmargs-examples\windows-services.

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
  COR_PROFILER_PATH_64=REPLACE_BASE_DIR\agent\vfagent.net.dll
  COR_PROFILER_PATH_32=REPLACE_BASE_DIR\agent\vfagent.net.x86.dll
  COR_ENABLE_PROFILING=1
  COR_PROFILER={cd7d4b53-96c8-4552-9c11-6e41df8eab8a}
  COMPlus_TailCallOpt=0