narayanu

REST Token service problem when using parameters in URL

Discussion created by narayanu on Sep 7, 2010
Latest reply on Sep 14, 2010 by narayanu
I have Arcgis server 9.3.1 set up with SQL server authentication and token service enabled. When i access a map service with just token passed in the Url (http: //myserver/arcgis/rest/services?token=....), i get authenticated properly. For example, the following url works.

http://miggisarcgis/ArcGIS/rest/services?token=YGJrmVR4_q_dBeL2DgeEXGWOkpQultJZ2psX3By9jNI4GOr-i-LfUsuA-mc534vU3UPhgZuOyZrJoifyPSw1R-6Z9TwnIwiik8atV_GlajY.

When requesting html output explicitly via url parameter (http: //myserver/arcgis/rest/services?token=....&f=html), this also works without any problem.

http://miggisarcgis/ArcGIS/rest/services?token=YGJrmVR4_q_dBeL2DgeEXGWOkpQultJZ2psX3By9jNI4GOr-i-LfUsuA-mc534vU3UPhgZuOyZrJoifyPSw1R-6Z9TwnIwiik8atV_GlajY.&f=html



However, when i request output in json format (http: //myserver/arcgis/rest/services?token=....&f=json) ,

http://miggisarcgis/ArcGIS/rest/services?token=YGJrmVR4_q_dBeL2DgeEXGWOkpQultJZ2psX3By9jNI4GOr-i-LfUsuA-mc534vU3UPhgZuOyZrJoifyPSw1R-6Z9TwnIwiik8atV_GlajY.&f=json

I get the following error:

{"error":{"code":498,"message":"Invalid token","details":["Unauthorized access"]}}

Is this a bug in ArcGIS Server 9.3.1 or i'm doing something wrong? I am trying everything on a fresh install of ArcGIS server.

Please help!

Outcomes