Hello
I'm trying to integrate it in a web application but I get a com exception. Is it possible to use it in a web application in IIS?
I tried the example on the home page and the code throws an exception when it tries to register the task: ts.RootFolder.RegisterTaskDefinition(@"Test", td);
[COMException (0x80041318): (46,4):Task:]
Microsoft.Win32.TaskScheduler.V2Interop.ITaskFolder.RegisterTaskDefinition(String Path, ITaskDefinition pDefinition, Int32 flags, Object UserId, Object password, TaskLogonType LogonType, Object sddl) +0
Microsoft.Win32.TaskScheduler.TaskFolder.RegisterTaskDefinition(String Path, TaskDefinition definition, TaskCreation createType, String UserId, String password, TaskLogonType LogonType, String sddl) +154
Microsoft.Win32.TaskScheduler.TaskFolder.RegisterTaskDefinition(String Path, TaskDefinition definition) +314
WebApplication1._Default.AddTask(Object sender, EventArgs e) in C:\Users\Stefano Ortelli\Documents\Visual Studio 2010\Projects\WebApplication1\WebApplication1\Default.aspx.cs:39
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +155
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707
I'm trying to integrate it in a web application but I get a com exception. Is it possible to use it in a web application in IIS?
I tried the example on the home page and the code throws an exception when it tries to register the task: ts.RootFolder.RegisterTaskDefinition(@"Test", td);
[COMException (0x80041318): (46,4):Task:]
Microsoft.Win32.TaskScheduler.V2Interop.ITaskFolder.RegisterTaskDefinition(String Path, ITaskDefinition pDefinition, Int32 flags, Object UserId, Object password, TaskLogonType LogonType, Object sddl) +0
Microsoft.Win32.TaskScheduler.TaskFolder.RegisterTaskDefinition(String Path, TaskDefinition definition, TaskCreation createType, String UserId, String password, TaskLogonType LogonType, String sddl) +154
Microsoft.Win32.TaskScheduler.TaskFolder.RegisterTaskDefinition(String Path, TaskDefinition definition) +314
WebApplication1._Default.AddTask(Object sender, EventArgs e) in C:\Users\Stefano Ortelli\Documents\Visual Studio 2010\Projects\WebApplication1\WebApplication1\Default.aspx.cs:39
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +155
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707