任务计划程序和IIS6(Windows Server 2003 [英] Task scheduler and IIS6 (windows server 2003

查看:125
本文介绍了任务计划程序和IIS6(Windows Server 2003的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题在这里简要描述:
.NET的新任务计划程序类库 [ .NET的新任务计划程序类库中的代码 [

My problem is briefly described here:
A New Task Scheduler Class Library for .NET[^]

I am using the code from A New Task Scheduler Class Library for .NET[^] to create scheduler tasks from my ASP web page.

Problem is, it works on my local machine (when testing) but not on the server (IIS6, Windows 2003).

It gives me this error Exception from HRESULT: 0x80070005 (E_ACCESSDENIED).

I have made a new administrator account on the server just for this job, entered it in IIS application pool for this website to run as this user, enabled anonymous access with the same user and am also using the same account for the credentials in code:

t.SetAccountInformation(user, userPass);



Task Scheduler服务以本地用户身份运行,如果我尝试进行更改,则会收到一条错误消息,该错误告诉我Task Scheduler依赖的其他服务正在以其他用户身份运行,因此无法更改它.

在每种情况下,我都会遇到访问被拒绝"错误,并且我不知道要进行哪些其他检查/更改才能使它正常工作.

到目前为止,我已经尝试使用Google搜索,但没有令人满意的答案.

任何帮助,将不胜感激.

在此先感谢



The Task Scheduler service is running as local user, if I try to change that I get the an error which tells me that the other services that Task Scheduler depends on are running as another user and therefore can''t change it.

In every case I get Access Denied error and I am out of ideas on what else to check/change to make this work.

I have tried googling this but no satisfying answer so far.

Any help with this would be greatly appreciated.

Thanks in advance

推荐答案

我看了那篇文章,其他人将其发布了:

您必须在setaccountinformation后面写一个标志:

I looked at that article, and someone else posted this:

You must write a flag after the setaccountinformation :

_Task.Flags = TaskFlags.RunOnlyIfLoggedOn;


这篇关于任务计划程序和IIS6(Windows Server 2003的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆