Show / Hide Table of Contents

Method AddCredential

AddCredential(Credential)

Adds a new Credential that the AuthenticationManager will use for accessing the resources.

Declaration
public void AddCredential(Credential credential)
Parameters
Type Name Description
Credential credential

The credential to add.

Remarks

This method is useful in some workflows a token is generated prior to accessing services (or web maps).

If you rely on CredentialPersistence assigned to the Persistence property, and that instance implements ILoadable, it must be loaded before calling this method.

Exceptions
Type Condition
System.InvalidOperationException

A loadable credential persistence is assigned but not loaded yet.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.8
.NET100.13 - 200.8
.NET Windows100.13 - 200.8
.NET Android200.0 - 200.8
.NET iOS200.0 - 200.8
.NET Framework100.0 - 200.8
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.8
In This Article
Back to top Copyright © 2022 Esri.