The “System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation” error

Applies to
ApexSQL Monitor


When a user attempts to enter the global metrics period value immediately after selecting the Metrics view, the above error will occur and the application will close


Due to a bug in the ApexSQL Monitor, when a user enters and applies the global metrics period value while the current view is not loaded completely, the exception will be thrown and the application will close.

Affected versions:

ApexSQL Monitor 2014 R2 and earlier.


For users that experience this issue, the problem can be overcome by waiting around 5-10 seconds after the Measurement window is loaded, to ensure that the background process is fully completed before trying to apply the global period value change.

ApexSQL plans to fix this issue in the next release.