
The code snippet below shows how to create an instance of the token provider to be used with Business Analyst Online tasks. A token provider can be associated with an instance of the BAOnlineClient class or with a task deriving from the ESRI.ArcGIS.Client.BAO.Tasks.BAOnlineTask<TResult> class. Different tasks can share the same token provider object.
To get the example working, specify valid values for username, password and the URLs.
C# | ![]() |
---|---|
BAOnlineTokenProvider tokenProvider = new BAOnlineTokenProvider(new UserCredentials("username", "password")); tokenProvider.Url = "https://baoapi.esri.com"; BAOnlineClient client = new BAOnlineClient("http://baoapi.esri.com"); client.TokenProvider = tokenProvider; |
System.Object
ESRI.ArcGIS.Client.BACore.Client.TokenProvider
ESRI.ArcGIS.Client.BAO.Tasks.Authentication.BAOnlineTokenProvider
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family