<?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 Re: Retrieving Token Dynamically from secure REST service in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-token-dynamically-from-secure-rest/m-p/590901#M55215</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;can you wrap the get response line in a try/catch to catch the webexception?&amp;nbsp; although it's returning 500, the web exception may have more information about what's really happening (404, 401, 407, etc.)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Aug 2010 17:24:07 GMT</pubDate>
    <dc:creator>AdamPfister</dc:creator>
    <dc:date>2010-08-04T17:24:07Z</dc:date>
    <item>
      <title>Retrieving Token Dynamically from secure REST service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-token-dynamically-from-secure-rest/m-p/590899#M55213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have two load balanced servers running my mapping application and I am attempting to retrieve my tokens for a secure service dynamically. Any maps from non-secure services are retrieved just fine. However, when I try to retrieve maps from the secure service, I get a "The remote server returned an error: (500) Internal Server Error."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using a proxy to request the token and it fails on the following line when trying to get the token from the token service:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;System.Net.WebResponse tokenResponse = tokenRequest.GetResponse();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I posted this here because I am using the JS API but need to post under REST API. I am going to stand up my app on a non load balanced server to see if that is the issue but that is not where it can run long term.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas??&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Aug 2010 15:29:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-token-dynamically-from-secure-rest/m-p/590899#M55213</guid>
      <dc:creator>PerryDonnafield</dc:creator>
      <dc:date>2010-08-04T15:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Token Dynamically from secure REST service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-token-dynamically-from-secure-rest/m-p/590900#M55214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, so i stood up my app on a non-load balanced server and it is retrieving the token dynamically just fine and returning a image from the secure service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anybody have any thoughts as to what the issue may be with the load balanced scenario?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Aug 2010 16:13:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-token-dynamically-from-secure-rest/m-p/590900#M55214</guid>
      <dc:creator>PerryDonnafield</dc:creator>
      <dc:date>2010-08-04T16:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Token Dynamically from secure REST service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-token-dynamically-from-secure-rest/m-p/590901#M55215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;can you wrap the get response line in a try/catch to catch the webexception?&amp;nbsp; although it's returning 500, the web exception may have more information about what's really happening (404, 401, 407, etc.)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Aug 2010 17:24:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-token-dynamically-from-secure-rest/m-p/590901#M55215</guid>
      <dc:creator>AdamPfister</dc:creator>
      <dc:date>2010-08-04T17:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Token Dynamically from secure REST service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-token-dynamically-from-secure-rest/m-p/590902#M55216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Adam, it is in a try/catch but I am just catching a general Exception and that is the error that is being thrown which is useless. I will catching a WebException first and see what I get.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Aug 2010 18:29:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-token-dynamically-from-secure-rest/m-p/590902#M55216</guid>
      <dc:creator>PerryDonnafield</dc:creator>
      <dc:date>2010-08-04T18:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Token Dynamically from secure REST service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-token-dynamically-from-secure-rest/m-p/590903#M55217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, for now, this thing has started working. I didn't really do anything. It is retrieving the token just fine and getting the image from the service. Wish I knew what was going on.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Aug 2010 18:41:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-token-dynamically-from-secure-rest/m-p/590903#M55217</guid>
      <dc:creator>PerryDonnafield</dc:creator>
      <dc:date>2010-08-04T18:41:25Z</dc:date>
    </item>
  </channel>
</rss>

