I have a problem when calling a method by reflection. When trying to trigger the method via Invoke(), the following exception is thrown:
Exception has been thrown by the target of an invocation.
This is the stackTrace message:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
Note: The application is hosted on IIS, when carrying out internal tests there are no problems, but when installing on my client the problem occurs.
I have already checked the number of parameters and it is correct, the method is static. The project is referencing the dlls where the method is located.
1