Select to view content in your preferred language

Loading layers from ServiceFeatureTable gives error: credentialCannotBeShared

196
4
Jump to solution
11-18-2024 11:15 AM
RTC
by
Emerging Contributor

Hello,

I am migrating code from 100 to 200 and I am running into an issue trying to load layers from a ServiceFeatureTable. The credentials are stored using ArcGISEnvironment.authenticationManager.arcGISCredentialStore.add(cred)

The layers are then added to the map using map.addOperationalLayers

However, all they layers fail to load with the error: credentialCannotBeShared

Any pointers on what would cause this error?

0 Kudos
1 Solution

Accepted Solutions
NimeshJarecha
Esri Regular Contributor

Hi @RTC,

Sorry to hear that you are running into this issue. The error means the url of the credential is not matching with the layer url.

Can you please check the serverContext url of the credential and url of the ServiceFeatureTable and post it here?

Regards,

Nimesh 

View solution in original post

4 Replies
NimeshJarecha
Esri Regular Contributor

Hi @RTC,

Sorry to hear that you are running into this issue. The error means the url of the credential is not matching with the layer url.

Can you please check the serverContext url of the credential and url of the ServiceFeatureTable and post it here?

Regards,

Nimesh 

RTC
by
Emerging Contributor

Hi Nimesh,

OK, I will check the urls an see what I get. Would there be any reason why this is working in 100 but not 200?

Thanks!

0 Kudos
RTC
by
Emerging Contributor

Thanks for the tip, it lead me to the issue. Thanks!

0 Kudos
NimeshJarecha
Esri Regular Contributor

Hi @RTC,

If you could provide examples of the v100 and v200 codes/URLs, I would be able to assist you in identifying why it was working in v100 and not in v200.

Regards,

Nimesh 

0 Kudos