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.


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


However, when i request output in json format (http: //myserver/arcgis/rest/services?token=....&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!