I am trying to add a secure FeatureService layer to my map, eventually I also want to take the data offline for editing as well. I am unable to do this using embedded usercredentials as below. I have double checked and triple checked the credentials and it works in other places just not here.
url: "http://domain.com/service/FeatureServer/0" // replacing with dummy layer
In my Map I have
// also tried to use credentials: userCredentials here.
The error log is
ArcGIS.Runtime.Feature: void __cdecl QmlFeatureTable::onInitializeComplete(const class QString &) EsriRuntimeQt::GeodatabaseFeatureServiceTable(0x1c7913c1e0)
ArcGIS.Runtime.Layer: void __cdecl QmlLayer::onLayerCreateError(const class QString &) QmlFeatureLayer_QML_52 "" "You are not authorized to access this information"
Solved! Go to Solution.
This was a bug with the identity manager. It will be fixed in the 10.2.6 release of the SDK, which will be out shortly. The workaround is to directly set the user credentials on the service table instead of using the identity manager.
Remember that a SSL intentionally limits who can access the website or data. You may need to change how you change the sharing preferences in the organization. Rather than having it Private, it may need to be shared to the group or organization with whom needs to have access to it.
You can take a look at the "User credential online" sample that is under the Security category. Let me know if this works for you.
Jen Trieu | Product Eng.
Thank you for the pointer.
I tried accessing the service through the sample and that works. But I am still unable to get it to work using embedded credentials. How can I replicate what the UserCredentialsDialog is doing without actually showing the user the dialog?
Thanks again for your help,
Before you upgrade to 10.3, you may want to consider the known issue with accessing secure services at 10.3 Server with the Qt/QML APIs - Release notes for ArcGIS Runtime SDK 10.2.5 for Qt—ArcGIS Runtime SDK for Qt | ArcGIS for Developers
For now, 10.2.2 should work. Can you please email me the service URL, and set up some temporary test credentials on the server for me to try and log in with?