This project has moved. For the latest updates, please go here.

Unable to connect to remote servers

Jun 25, 2012 at 5:02 AM
Edited Jun 25, 2012 at 5:06 AM

Hi there,

I recently read a post about connecting to remote servers where one of the ways to check credentials was to open my local task scheduler (windows 7), and connect to a remote server as another user. I'm connecting to a windows server 2008 r2 machine, and it works fine when i plug in my credentials - DOMAIN\User, password, server name etc.

When i use exactly the same credentials from within my c# application, i get an access denied error message. What i'm not sure about is why i would be able to connect via the task scheduler mmc, but not my application - am I missing rights or something along those lines?

--- edit

so, it seems that i can only do this using the overloaded constructor - if i just make a new instance of TaskService, and set the target server / username / password / domain separately, it doesn't work, but with all the details inside the constructor, it works fine.