Quantcast
Channel: Task Scheduler Managed Wrapper
Viewing all articles
Browse latest Browse all 2206

Closed Unassigned: System.NullReferenceException exception in web service call task [11850]

$
0
0
I wrote an c# console app which calls web service.
I needed to run this app for every night, so I decided to use this task scheduler as it seems a good one to do my job.

But I got an issue which says "Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. ..."
I read many articles described about same issue, but nothing is helpful.

For example,

```
TaskDefinition td = ts.NewTask();
td.RegistrationInfo.Description = "Does something";
td.Principal.Id = "any string";
td.Principal.GroupId = "NETWORK SERVICE";
td.Principal.RunLevel = TaskRunLevel.LUA;
td.Principal.LogonType = TaskLogonType.S4U;
ts.RootFolder.RegisterTaskDefinition(@"NetsuiteInvoiceGetTask", td);
```

My OS is Windows7 64bit.
Can anyone help me? Thanks.
Comments: Unknown resolution

Viewing all articles
Browse latest Browse all 2206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>