Task registration fails with error: Can't find the task server port numbers. Object reference not set to an instance of an object.