{“Code”:“Robot”,“Title”:“Exception has been thrown by the target of an invocation.”,“Detail”:“in Main.xaml\r\n at InvokeCode "Invoke Code"\r\n at Sequence "Main Sequence"\r\n at Main "Main"\r\n\r\nSystem.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.\r\n —> System.UnauthorizedAccessException: Access to the path ‘C:\Users\HP\Documents\UiPath\GST_Automation - Copy\GST_Automation_Logs’ is denied.\r\n at System.IO.FileSystem.CreateDirectory(String fullPath, Byte securityDescriptor)\r\n at System.IO.Directory.CreateDirectory(String path)\r\n at UiPathCodeRunner_a7f0aa65bd9b45febf17fd03f15f69e2.Run(String BasePath)\r\n at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)\r\n at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span1 copyOfArgs, BindingFlags invokeAttr)\r\n --- End of inner exception stack trace ---\r\n at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span1 copyOfArgs, BindingFlags invokeAttr)\r\n at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture)\r\n at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object providedArgs, ParameterModifier modifiers, CultureInfo culture, String namedParams)\r\n at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object args)\r\n at UiPath.Activities.System.Utilities.InvokeCode.CompilerRunner.Run(Object args)\r\n at UiPath.Activities.System.Utilities.InvokeCode.NetCodeInvoker.Run(String userCode, List1 inArgs, IEnumerable1 imps, Object args)\r\n at UiPath.Core.Activities.InvokeCode.Execute(CodeActivityContext context)\r\n at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)\r\n at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)”,“Category”:null,“Status”:null}
This is coming when i trigger the workflow from orchestrator.