Troubleshooting steps to identify and resolve the `System.AccessViolationException` crashing issue while monitoring the .NET applications

Troubleshooting steps to identify and resolve the `System.AccessViolationException` crashing issue while monitoring the .NET applications

Understanding

Our .NET agent instrumentation may encounter issues with specific versions of framework methods in your .NET applications, resulting in disruptions to the application monitoring process. If you encounter the exception "System.AccessViolationException"  while running the APM Insight .NET agent, follow these steps to identify and resolve the issue:

Identify this Crashing issue with Event Logs

1. Open Event Viewer logs from the agent installed machine
2. Look for exception entries like below example:


Here, instances of connectivity errors and performance degradation were observed, indicating a potential conflict with the ServiceChannelProxy framework.

Solution

Follow the below steps to resolve the exception:
1. Navigate to the `C:\ProgramData\DotNetAgent`  directory
2. Open the `apminsight.conf` file using a text editor. Add the appropriate class method which cause `System.AccessViolationException` under .NET Runtime source as mentioned above screenshot at the end of the file(Ensure there is an extra empty line after adding the configuration):
<Appropriate-Access-Violation-Exception-Occured-Method>=false
For Example here: 
System.ServiceModel.Channels.ServiceChannelProxy.InvokeService=false
Note: This change removes tracking for the specified method by the agent to prevent the access violation further. 

3.  After saving the changes, restart the `ManageEngine .NET agent service` to apply the new configuration settings.

Additional Notes

We have acknowledged this issue and have included it in our roadmap for future releases to provide a permanent fix. In the meantime, implementing the suggested configuration changes will mitigate the instrumentation issues caused by the incompatible framework methods.

If the issue persists, Kindly contact the support@manageengine.com along with the updated Agent diagnostics

                  New to ADManager Plus?

                    New to ADSelfService Plus?