Show / Hide Table of Contents

Method StartAsync

StartAsync()

Asynchronously starts this local service instance, and returns a Task object.

Declaration
public virtual Task StartAsync()
Returns
Type Description
Task

A task that represents the asynchronous start operation.

Exceptions
Type Condition
InvalidOperationException

Service can only be started when in the stopped state.

LocalServerException

Cannot start this service as it is already running on the LocalServer.

LocalServerException

Cannot start service because a LocalService with the same Name is already running.

LocalServerException

Local Server requires a standard level license to start. The current license level is basic (see ArcGISRuntimeEnvironment.License.Level). For a deployment you can initialize the runtime with a standard level license in ArcGISRuntimeEnvironment.License.SetLicense(). If you are developing an app then you can avoid setting ArcGISRuntimeEnvironment.ClientId to remain in developer mode to try out LocalServer.

Applies to

Platforms and versions
TargetVersions
.NET 6.0 Windows100.13 - 100.14
.NET Framework100.0 - 100.14
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12

StartAsync(CancellationToken)

Asynchronously starts this local service instance, and returns a Task object.

Declaration
public virtual Task StartAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken

The token to monitor for cancellation requests. The default value is None.

Returns
Type Description
Task

A task that represents the asynchronous start operation.

Exceptions
Type Condition
InvalidOperationException

Service can only be started when in the stopped state.

LocalServerException

Cannot start this service as it is already running on the LocalServer.

LocalServerException

Cannot start service because a LocalService with the same Name is already running.

LocalServerException

Local Server requires a standard level license to start. The current license level is basic (see ArcGISRuntimeEnvironment.License.Level). For a deployment you can initialize the runtime with a standard level license in ArcGISRuntimeEnvironment.License.SetLicense(). If you are developing an app then you can avoid setting ArcGISRuntimeEnvironment.ClientId to remain in developer mode to try out LocalServer.

TaskCanceledException

The operation was cancelled

Applies to

Platforms and versions
TargetVersions
.NET 6.0 Windows100.13 - 100.14
.NET Framework100.13 - 100.14
In This Article
Back to top Copyright © 2021 Esri.