How to keep session alive while disconnecting Remote Desktop?


When executing a process:
a) if I minimize the Remote Desktop Connection it works fine.
b) if I close the Remote Desktop Connection an error is shown:

UiPath.Core.ElementOperationException: Desktop has been disconnected while performing UI actions. —> System.Runtime.InteropServices.COMException: Desktop has been disconnected while performing UI actions.

  • at UiPath.UiNodeClass.WriteText(String text, UiInputMethod inputMethod)*
  • at UiPath.Core.UiElement.WriteText(String text, InputMethod method)*
  • — End of inner exception stack trace —*
  • at UiPath.Core.Activities.TaskAsyncCodeActivity`1.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)*
  • at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)*
  • at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)*

What can I do to avoid this error message?

Notice I run the process manually (I am trying testing with the Studio version).

Do you mean it times out or do you purposely close RDP? because if you close it, the execution of course won’t be able to run.

Why of course?

I think there must be a solution that includes keeping the session alive even closing the RDP.

So from my understanding that the extent for RDP of UI Automation to work is only until minimization. I’ve yet to see anyone proceed with a closed RDP to perform their automation!

I might be wrong!

Thanks. So then shouldn’t I ever even shut down my computer in order to let the processess be working?

yeap! You shouldn’t because once you do, your session will be deleted as you’ve logged out of the RDP.