We need to know how to kil/cancel server tasks

We are currently using ServerTask as part of adding cameras via the configapi, as following the sdk sample. We can create tasks and add cameras, however, there are many situations where this task hangs or we get orphaned tasks that are still open on the server. We can see this when we do a camera add and it hangs and then in the management client we get a message about a search or add is in progress. Is there a way to for us to kill/cancel active server tasks?

In looking at the demo apps, they are all waiting for ServerTask.Status but what happens is that if the task hangs there is no way to end it…please advise.

The HardwareScan servertask is stoppable and has a StopTask method. Other servertasks are not stoppable.

Notes -

The task does not stop immediately, just like you experience if you interrupt the hardware scan in the Management Client it takes a while until the recording server actually stops the task.

The HardwareScan servertask was made stoppable in 2018R1, if you have an older server you cannot stop the task from the Configuration API.

Bo, thanks for the reply. Do you have any more specific info on how to stop it exactly in 2018 r1+?