Creating a remote task in a Workgorup environment.

Topics: Errors
Oct 29, 2014 at 7:29 PM
Edited Oct 30, 2014 at 10:45 AM

Currently I am trying to create a task in remote machine through TaskService class. The remote machine is connected through workgroup. But I am not able to create task in remote machine. I am getting following exception.

System.UnauthorizedAccessException was unhandled
Message=Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

So is it possible to create task in remote machine where computers are connected through workgroup? Or it is only possible through if computers are connected through domain server?

Please revert.

Oct 30, 2014 at 2:43 PM
I don't have a configuration that will allow me to test, but I believe this can be done by specifying a valid username and password during the TaskService instantiation.
TaskService ts = new TaskService("COMPUTERNAME", "remoteUserAcctName", "COMPUTERNAME", "remoteUserPassword");
Oct 30, 2014 at 4:41 PM
Edited Nov 2, 2014 at 6:10 PM
Hi Dahall,

Thank you for your response. I tried with your suggestion but got same error, "Access is denied".
I am trying to create task in remote computer running Windows 7 from a computer running Windows 7. Can I do this? Because as per this link, , one can connect to remote computers running Windows Server® 2008, Windows Vista®, Windows Server 2003, Windows XP, or Windows 2000,

Also I tried from Task Scheduler menu 'Action | Connect to Another Computer', , I got error 'You do not permission to access this computer'.

Please revert. I am waiting for your reply.

Jul 10, 2015 at 8:36 AM

I repaired this error going to services.msc and activating the "Remote Registry". But I'm getting another error right now. "Excepción al llamar a "GetFolder" con los argumentos "1": "Sólo se permite esta operación cuando está conectado al servidor. (Excepción de HRESULT: 0x800704E3)""

It's like is trying to get the folder but im not connected and it can't acces.

Someone knows what can i do?

Thanks in advance.
Jul 10, 2015 at 10:34 PM
josesi: Thanks for the recommendation. When and how are you getting the GetFolder error? Which method throws the exception, GetFolder explicitly or through another method call? Are you getting a COMException or another exception?