Hi, we are currently trying to transition to ArcGIS Enterprise from ArcGIS Server. We have a sample map service that we published as a WFS layer which has all of the functions we need. We can access the map if we set the "Share" field of the map to "Everyone" but the map won't load if we use "Organization" or "Owner" even if we set the IdentityManager credential as the same user that created the map.
This is how we set the credential:
var cred = await IdentityManager.Current.GenerateCredentialAsync("https://<our portal site>/portal/sharing/rest/", "username", "password");
IdentityManager.Current.AddCredential(cred);To confirm that the credential is working, I tried adding:
await Esri.ArcGISRuntime.Portal.ArcGISPortal.CreateAsync(new Uri(_portalUrl));
The resulting portal object does show the CurrentUser object as the user that we added. Also, we get errors if we use an invalid user.
We then create our layer and add it to the map using the following code:
Map dynamicMap = new Esri.ArcGISRuntime.Controls.Map
{
Layers = new LayerCollection()
};
ArcGISDynamicMapServiceLayer layer = new ArcGISDynamicMapServiceLayer(new Uri("https://<our portal server>/server/rest/services/Hosted/PortalTest2WFS/MapServer"));
layer.Opacity = 1;
await layer.InitializeAsync();
dynamicMap.Layers.Add(layer);
MapView.Map = dynamicMap;
When we set the WFS map's Share to "Everyone", the map loads fine. If we set it back to "Organization" or "Everyone", it doesn't load anything. I don't get any errors as well.
Please help 🙂