Select to view content in your preferred language

Aquiring Token

1506
12
05-14-2013 01:22 PM
JuneAcosta
Frequent Contributor
I have been spending too much time trying to create a token for my services with no success. Im hoping I can get the help I need from this forum since the ESRI Analyst that has helped me seemed just as confused.

Here's my scenario:
    I have ArcGIS server 10.1 SP 1 running on Amazon EC2 within a VPC(virtual private cloud).
    I have a customized version of the arcgis online simple map viewer (JSAPI)
    The IP address is 10.0.244.20- this is what I use to RDP to the instance (JSAPI)
    Both gismaps and gismaps.carlsbadca.gov are pointers to 10.0.244.20
    I tried using both the arcgis account and the AGS admin account for the token and had no luck

     webmap.itemData = {
          "operationalLayers": [
    {
      "url": "http://10.0.244.20/arcgis/rest/services/publicAGS/trafficStatus/MapServer/1",
      "id": "trafficStatusMobile_5116",
      "visibility": true,
      "opacity": 1,
      "title": "Carlsbad Boundary"
    },
 {
    "url": "http://10.0.244.20/arcgis/rest/services/publicAGS/trafficStatus/MapServer/0",
    //"id": "trafficStatusMobile_6847",
    "visibility": true,
    "opacity": 1,
    "mode": 1,
    "title": "Road Maintenance",


I need a 1 year token
    Do I create the token from my desktop or from the Amazon instance?
    Do I use HTTP Referer? IP Address? or IP address of this request's origin? If I use http Referer, what's the syntax for http referer:?
Tags (2)
0 Kudos
12 Replies
nicogis
MVP Alum
0 Kudos
JuneAcosta
Frequent Contributor
Yes I saw this documentation, and followed the outline, but still no luck with creating a token that works.

Thanks for your response.
0 Kudos
nicogis
MVP Alum
how you have create a token?
Have you use ip , Referer, request ip?
Where do you use token : in a proxy?
0 Kudos
JuneAcosta
Frequent Contributor
I have tried to use all 3. Im using thru a proxy page, but even if I test the token in a browser by appending it to the rest URL it fails.
0 Kudos
nicogis
MVP Alum
where you do store user/roles arcgis server ?
when you do generate with HTTP Referer what do you write in textbox?
0 Kudos
JuneAcosta
Frequent Contributor
User Store and Role Store are using ArcGIS Server Built-in.

For Http Referer I uses: http://10.0.244.20
0 Kudos
nicogis
MVP Alum
from browser do you do a request kind: http://10.0.244.20/arcgis/rest/services/publicAGS/trafficStatus/MapServer/1...with token and have you problem?
0 Kudos
JuneAcosta
Frequent Contributor
Yes I tested the token like this..

http://10.0.244.20/arcgis/rest/services/publicAGS/trafficStatus/Mapserver?token=_t9tqPaLDyZjyIMqDk_R...

but I still get the login window. I put in the username and password and it works, so I know that the login Im using to create the token is valid.
0 Kudos
nicogis
MVP Alum
can you generate token with httreferer  http://nameofmachine and try in browser with http://nameofmachine/arcgis/rest/servi....?token=...
0 Kudos