AnsweredAssumed Answered

Viewer User-Type Update Feature on Public Layer

Question asked by latitudeqa on Jul 29, 2019
Latest reply on Aug 19, 2019 by PMaske-esristaff

I'm running into an issue around using the ArcGIS Online "Viewer" (formerly Level 1) User-Type and attempting to update an anonymously editable (shared with everyone + editable) feature layer, and I'm trying to determine whether I'm doing something invalid or whether it might be a bug in the runtime. I'm using the Xamarin Forms .NET Runtime (100.5).


When I first load a webmap with the anonymously editable feature layer and set the runtime license to the NamedUser-type license obtained from AGOL (a "Lite" license), I am able to update a feature on that layer's ServiceFeatureTable using a call to myServiceFeatureTable.UpdateFeatureAsync(myFeature). However, if I reload the map while still in my app (i.e. assign my map control a new Map() object at the same webmap URL and load it), I get the following error if I try to make the same UpdateFeatureAsync() call again on the same feature:


Esri.ArcGISRuntime.ArcGISRuntimeException: 'Attempt to use functionality that is not supported for the current license level'


I've found a workaround that works some of the time, which is to clear out the existing credentials in the AuthenticationManager and re-apply them before reloading the map, like:


>   var tmpCred = AuthenticationManager.Current.Credentials.First();

>   AuthenticationManager.Current.RemoveAllCredentials();

>   AuthenticationManager.Current.AddCredential(tmpCred);


>   // Now reload the webmap and try to update the feature again


This also seems to fail intermittently, however, and I have been so far unable to determine the difference in state between when it's succeeding and when it's failing. Are there any steps I might be missing when reloading the webmap? Why would reloading the credentials here potentially make any difference? Is this simply unsupported behavior?


Thanks in advance,