Hi,
I've tried to update ArcGIS Runtime to Version 300 today and noticed an issue:
When credential creation fails for a federated service, the challenge handler is called repeatedly without stopping.
I am aware of the new Error and PreviousFailureCount properties on CredentialRequestInfo. According to the description of PreviousFailureCount, authentication should be attempted at most five times for a single failed request. However, in my case, authentication continues indefinitely, and CredentialRequestInfo.PreviousFailureCount always remains 0 for the federated service.
The other request details are:
- AuthenticationType: Token
- Error: A token or API key is required: A token or API key was not provided to access xyz
I create PregeneratedTokenCredential instances programmatically in a web service. If credential creation fails, indefinite authentication retries are a significant issue because they repeatedly call the web service.
I also noticed that, for federated services, CredentialRequestInfo.ServiceUri now contains the portal URL instead of the service URL. This is not the issue here though.
Am I doing something wrong, is this a Bug or expected behaviour?
Best regards,
Tim
Solved! Go to Solution.
I updated the SDK to version 300.1, and the issue now appears to be resolved. The challenge handler is called only once instead of repeatedly.
I am not sure what caused the issue, but I found the following fix in the release notes, which may be related:
I also noticed that the challenge handler was called multiple times only when a failed challenge threw an exception. When the handler returned null instead, it was called only once.
Since the latest SDK version appears to have resolved the issue, I am marking this as solved.
I updated the SDK to version 300.1, and the issue now appears to be resolved. The challenge handler is called only once instead of repeatedly.
I am not sure what caused the issue, but I found the following fix in the release notes, which may be related:
I also noticed that the challenge handler was called multiple times only when a failed challenge threw an exception. When the handler returned null instead, it was called only once.
Since the latest SDK version appears to have resolved the issue, I am marking this as solved.