John Mills
John Mills

Reputation: 10263

Permissions required to create/modify tasks in Windows Task Scheduler

I need to create and modify tasks in Windows Task Scheduler on Windows Server 2003 from an ASP.NET web application. The Network Service that the web app runs under is unable to make the changes. It errors with an System.UnauthorizedAccessException exception.

It works fine running from Visual Studio on my desktop.

What permissions do I need to grant an account so that the tasks can be modified from ASP.NET?

Upvotes: 4

Views: 14561

Answers (3)

John Mills
John Mills

Reputation: 10263

Jose's answer solved my problem partially. However, there was an additional problem where Windows Server 2003 didn't like me specifying Local System as the account that the task would run under. It seemed to not like me passing in a null password which is how you specify Local System. I worked around the problem by making a local account on the server for tasks to run under and specifying this new account.

Specifying Local System didn't cause any problem on Windows XP.

Additional info

Upvotes: 1

Jose Basilio
Jose Basilio

Reputation: 51468

The account needs to have read/write permissions to the "Tasks" directory. Here's the path:

%SystemRoot%\system32\Tasks\

Upvotes: 6

Related Questions