[GIS] reason why the ArcGIS Server token works, when the URL refers to the physical server, but does not work when I use the mapped URL

arcgis-serverauthentication

http://servername:6080/arcgis/rest/services/xxx/xxx/MapServer?token=xxx

works fine and I am directed to the service information without a need to login

however

when using the mapped (external DNS record) reference, it gets to the ArcGIS REST login page

http://xxx.com.au/arcgis/rest/services/xxx/xxx/MapServer?token=xxx

Best Answer

Like Dan mentioned in his comment, how and where are you generating your token?

I ran into a similar issue with some REST API scripting. I had generated my token at http://localhost:6080/arcgis/admin/generateToken with the Client parameter set to Request IP. When I would try and access secured services programmatically using my public URL and token (much like you are doing), I would get an error for invalid token.

What I had to do was generate my token from the REST admin at the public URL (http://domain.com/arcgis/admin/generateToken), using Request IP, then my token was valid when used in conjunction with the public URL.

Related Question