<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Issue with invalid token in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/issue-with-invalid-token/m-p/689676#M3350</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I wasn't entirely sure whether to post this in the Flex forum or the REST API forum but since my issue is with an operational layer that I am accessing through the REST services API I figured this was the more appropriate forum.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am accessing a secure service by passing a token generated by the token service in the query string for the REST URL.&amp;nbsp; I am generating the token using the ArcGIS web pages currently although I plan to use an HTTPS request from my application to retrieve the token for each user in the future.&amp;nbsp; Because my application is being deployed in the ESRI Flex Viewer I am specifying the "Client ID" as my IP address when creating the token.&amp;nbsp; I am generating the token and appending it to the URL for the service in the config.xml file for the viewer.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the issue; when I specify the URL using the machine name, it works just fine, however, if I specify the URL using the domain name I get an "Invalid Token" error with a fault code of 498.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Example (note that I am using http in this case because https will only work for the domain name that the certificate is registered for):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://SERVER_NAME/ArcGIS/rest/services/SecureServices/SERVICE_NAME/MapServer?token=TOKEN"&gt;http://SERVER_NAME/ArcGIS/rest/services/SecureServices/SERVICE_NAME/MapServer?token=TOKEN&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Works while&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://DOMAIN_NAME/ArcGIS/rest/services/SecureServices/SERVICE_NAME/MapServer?token=TOKEN"&gt;http://DOMAIN_NAME/ArcGIS/rest/services/SecureServices/SERVICE_NAME/MapServer?token=TOKEN&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;does not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit: Derp, ok, the answer is because when using the domain name I am routed differently from when I use the internal network name.&amp;nbsp; In one instance I arrive with an external IP address as my HostAddress and in another I arrive with my internal IP.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Oct 2011 19:05:57 GMT</pubDate>
    <dc:creator>VictorCiminera</dc:creator>
    <dc:date>2011-10-25T19:05:57Z</dc:date>
    <item>
      <title>Issue with invalid token</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/issue-with-invalid-token/m-p/689676#M3350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I wasn't entirely sure whether to post this in the Flex forum or the REST API forum but since my issue is with an operational layer that I am accessing through the REST services API I figured this was the more appropriate forum.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am accessing a secure service by passing a token generated by the token service in the query string for the REST URL.&amp;nbsp; I am generating the token using the ArcGIS web pages currently although I plan to use an HTTPS request from my application to retrieve the token for each user in the future.&amp;nbsp; Because my application is being deployed in the ESRI Flex Viewer I am specifying the "Client ID" as my IP address when creating the token.&amp;nbsp; I am generating the token and appending it to the URL for the service in the config.xml file for the viewer.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the issue; when I specify the URL using the machine name, it works just fine, however, if I specify the URL using the domain name I get an "Invalid Token" error with a fault code of 498.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Example (note that I am using http in this case because https will only work for the domain name that the certificate is registered for):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://SERVER_NAME/ArcGIS/rest/services/SecureServices/SERVICE_NAME/MapServer?token=TOKEN"&gt;http://SERVER_NAME/ArcGIS/rest/services/SecureServices/SERVICE_NAME/MapServer?token=TOKEN&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Works while&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://DOMAIN_NAME/ArcGIS/rest/services/SecureServices/SERVICE_NAME/MapServer?token=TOKEN"&gt;http://DOMAIN_NAME/ArcGIS/rest/services/SecureServices/SERVICE_NAME/MapServer?token=TOKEN&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;does not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit: Derp, ok, the answer is because when using the domain name I am routed differently from when I use the internal network name.&amp;nbsp; In one instance I arrive with an external IP address as my HostAddress and in another I arrive with my internal IP.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 19:05:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/issue-with-invalid-token/m-p/689676#M3350</guid>
      <dc:creator>VictorCiminera</dc:creator>
      <dc:date>2011-10-25T19:05:57Z</dc:date>
    </item>
  </channel>
</rss>

