GithubHelp home page GithubHelp logo

Comments (16)

Hung-Yang avatar Hung-Yang commented on May 24, 2024 1

Hello,

thank for you to create this project , and i meet some problem as below.

im trying to connect to a remote machine by same code and same IIS machine as below , and using different version of Task Scheduler, then i get the different response.

TaskService ts = new TaskService(workstation, userName, domain, password, true);

when using version 2.8.6.0 will get response as incorrect user name or password.

and when i change to version 2.5.28 , then i get the right TaskService back.

But i still want to use the new version, so what can i do to fixed it?

thank you!

from taskscheduler.

dahall avatar dahall commented on May 24, 2024

I'd suggest two things:

  1. Make sure you have followed the instructions in the documentation for opening both sides of the connection.
  2. Try using the TaskSchedulerConfig tool I wrote to help troubleshoot this exact kind of scenario. There is a ClickOnce install link at the bottom of the page.

from taskscheduler.

first100 avatar first100 commented on May 24, 2024

Thank you for your reply, i have followed the instructions in documentation and now execute the TaskSchedulerConfig, i trying to enumerate task from local machin with Windows 10 pro to remote machines with win 2003 or win 2008 server. I always has this error "The request is not supported. (Exception from HRESULT: 0x80070032)"

from taskscheduler.

dahall avatar dahall commented on May 24, 2024

Do you get the exception on the TaskService constructor or elsewhere? Also, the WS2003 will always be V1 so you may have more luck by specifying true for the forceV1 parameter of the TaskService constructor.

from taskscheduler.

first100 avatar first100 commented on May 24, 2024

The exception is in the constructor , i have now tried on Win Server 2012 R2 (with true and then with false) but the error is same .
capture

Thanks.

from taskscheduler.

dahall avatar dahall commented on May 24, 2024

Are user, domain or password equal to NULL?

from taskscheduler.

ChrisonSimtian avatar ChrisonSimtian commented on May 24, 2024

Hi dahall, I've experienced the same issue as described above .
Your validation tool didnt find any issues and the method gets a valid username together with the correct password.

The lib seems to work fine on machines that dont belong to an active directory domain, but as soon as I try it on a machine that is in a domain, the above error comes up.

Any ideas?

PS: Ive handed over the userId in several variations together with the domains name, none seemed to work. Neither did handing over just the username.

from taskscheduler.

dahall avatar dahall commented on May 24, 2024

When running the Diagnostic tool, make sure you are running "As Administrator" and running on both sides of the connection. There are failures that can only be detected on one side or the other with elevated permissions. You should also, at the end of the first run, click on "Troubleshoot connecting to a remote computer" and go through those steps.

@ChrisonSimtian: I have run this tool in an AD environment for many years. Often there are firewall, access list, or policy problems on one side of the connection.

from taskscheduler.

dahall avatar dahall commented on May 24, 2024

Also, after running the tool, if any of the issues are "Not fixed", you can click on "View detailed information", find the error in question and see if there is "Requires consent" status. If so, you can click on the ">" (Play) button to the far right to fix that error as well.

from taskscheduler.

Anastasius80 avatar Anastasius80 commented on May 24, 2024

I have the same error on my site. I used the tool (above) and checked all. Everything is ok.

I used followning command:

new TaskService($@"\{HostFqdn}", _adminUsername, _adminDomain, _adminPassword);

I got the error, after that i tried to use following command:

new TaskService($@"\{HostFqdn}");

and run the program with "run as" and used the "admin user". Now it works, but i don't want to run the program with the user directly, i want to use the first command.

Any ideas?

from taskscheduler.

dahall avatar dahall commented on May 24, 2024

@Anastasius80: When running the tool, did you also (at the end) run the "Test Remote Connections" button? Also, did you try running the tool on both the client side host and the remote host?

If so, and they all checked out, then I'm out of ideas. Microsoft has not documented all the conditions that have to be in place for remote connections to work for their underlying ITaskService to connect. The tool tests for all those I have found on my own. I have found, like you, that:

  • Connections work best when using the client host token (no username)
  • Firewalls cause big problems on the client and remote host
  • Connecting from one OS version to another has more problems than connecting from like to like
  • User privileges on both sides of the connection play a significant role.

from taskscheduler.

Anastasius80 avatar Anastasius80 commented on May 24, 2024

@dahall thanks for your response. My solution is now, that i used the client host token:

• Connections work best when using the client host token (no username)

I tested all (both sides) with the tool, and found no errors, every button is clicked :)

Thank you for your help!

from taskscheduler.

dahall avatar dahall commented on May 24, 2024

from taskscheduler.

dahall avatar dahall commented on May 24, 2024

What are the Windows versions of the two machines?

from taskscheduler.

dahall avatar dahall commented on May 24, 2024

And. what are the Windows versions of the host machines (where the library is executed)?

from taskscheduler.

Hung-Yang avatar Hung-Yang commented on May 24, 2024

What are the Windows versions of the two machines?

Server slite is windows server 2012 R2 and remote site is server 2003
and library used in 2012R2

from taskscheduler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.