How to troubleshoot vFunction Agent not loading on .NET Applications running in a Windows environment
Overview of the Issue
This article is meant to help when:
- The vFunction Agent is not loading in a .NET Application running in a Windows environment
- The vFunction Controller is not able to talk to the vFunction Agent and no log file is created by the vFunction Agent
Check %TEMP% Location for Logging
The vFunction Agent attempts to create a new file named vfagent.net.log to capture Standard Output and Standard Error in the instance-specific vFunction logging directory. For example, this may be in C:\home\vfunction\log\instances\default-dotnet\vfagent.net.log
.
If an issue arises that prevents the Application from writing to this directory, the vFunction Agent will write the log file to the %TEMP% directory. Open Windows Explorer and input the string %TEMP% into the Search Bar to navigate to this location and search for this file. Note that this workflow is accessible the Environment Variable %TEMP% for the user that runs the Application. This may be a separate user from the one initiating the RDP Session.
The %TEMP%\vfagent.net.log may contain errors about accessing the vFunction Agent DLL that need to be corrected. Or, the log may show that the installation.yaml’s agent.application_name field needs to be adjusted to hook into the relevant .NET Process.
Gather Errors About Loading the vFunction Agent
- On the Windows machine where the Application is running, download DebugView and unpack this Microsoft tool
- Right-click on dbgview64.exe and select Run as Administrator
- Select Capture from the Menu Bar
- Check the dropdown options to Capture Win32, Capture Global Win32, Pass-Through, and Capture Events
- Restart the Application. For example if an IIS Application, recycle the Application Pool, use an API and ensure there’s a new w3wp.exe Process ID.
- The Windows Error code may provide next steps about the source of the issue in order to resolve the problem, such as the wrong path to the vFunction Agent DLL or permissions issues.