Query failed: error code: '499': 'Token Required'

5295
4
Jump to solution
01-12-2015 08:03 AM
ShaningYu
Frequent Contributor

Scenario:  Executing a Silverlight application. In this application, 10 map layers are defined in the config.xml.  I run this application well on last Friday before I left the office.  But in the earlier Monday morning, when I run it again, the message:  Query failed: error code: '499': 'Token Required', displays.  I checked and found it was due to the access to the 10 map layers defined in the config.xml.  In my .xml, there is no setup for security (e.g. userID and password).  I can't figure out why this happens suddenly.  Appreciate if you can provide your advisory.

0 Kudos
1 Solution

Accepted Solutions
DominiqueBroux
Esri Frequent Contributor

The easiest way is to activate the IdentityManager with the SignInDialog provided in the toolkit. Put the following line at application startup:

ESRI.ArcGIS.Client.IdentityManager.Current.ChallengeMethod = ESRI.ArcGIS.Client.Toolkit.SignInDialog.DoSignIn;

In this case the user will get challenged when an authorization error is intercepted by the Identity manager.

View solution in original post

0 Kudos
4 Replies
DominiqueBroux
Esri Frequent Contributor

Error '499' means that your service is secured and you need a token to access it.

Can you still access to your services through a browser?

0 Kudos
ShaningYu
Frequent Contributor

You are right.  If I open the URL directly, I get a page to ask me to logon.  After I logon, I can view the map layers. But I still get the 499 error if I run the program.  How can it be be fixed?  Thanks.

0 Kudos
DominiqueBroux
Esri Frequent Contributor

The easiest way is to activate the IdentityManager with the SignInDialog provided in the toolkit. Put the following line at application startup:

ESRI.ArcGIS.Client.IdentityManager.Current.ChallengeMethod = ESRI.ArcGIS.Client.Toolkit.SignInDialog.DoSignIn;

In this case the user will get challenged when an authorization error is intercepted by the Identity manager.

View solution in original post

0 Kudos
ShaningYu
Frequent Contributor

Problem solved - I reset the the map layers access properties as public.  Thanks for your hint.

0 Kudos