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
| Target | Versions |
|---|---|
| .NET 6.0 Windows | 100.13 - 100.15 |
| .NET Framework | 100.0 - 100.15 |
| .NET 5 | 100.10 - 100.12 |
| .NET Core 3.1 | 100.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 System.Threading.CancellationToken.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. |
| System.Threading.Tasks.TaskCanceledException | The operation was cancelled |
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| .NET 6.0 Windows | 100.13 - 100.15 |
| .NET Framework | 100.13 - 100.15 |