Can't Download AGOL Tile Maps

09-12-2016 01:37 PM
Occasional Contributor

I am working on an online offline map from  the DotNet tutorial offline map tutorial. Everything works well including the offline rendering from the locally created database. However, when I want to use another tiled base map such as the following I am not able to. I have tried using the credential variable from the IdentityManager class using my organization login and password from bellow documentation but have not had any luck. The credentials are not going through. Help!!!



_portal = new ArcGISPortal();


// use the IdentityManager to authenticate a user for a portal
    // exception will be thrown here for bad credential ...
    var cred = await Esri.ArcGISRuntime.Security.IdentityManager.Current.GenerateCredentialAsync(
        "", "myLogin", "myPassword");

    // add credential if generation was successful
catch(ArcGISWebException webExp)
    // ... handle exception for bad credential here ...

// connect to the server (IdentityManager automatically includes the credential if available)
_portal = await Esri.ArcGISRuntime.Portal.ArcGISPortal.CreateAsync(new Uri(""));
ArcGISPortalUser user = _portal.CurrentUser;
var userName = user.FullName;
var orgName = _portal.ArcGISPortalInfo.Name;

0 Kudos
1 Reply
Regular Contributor II

If I understood correctly, you get signed in ok to the portal that you are using and get portal and user information but when you try to create the offline export, it gives an error?

0 Kudos