<?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: dynamic layer using a token in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamic-layer-using-a-token/m-p/34422#M898</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I only use url="..." and token="..." without UrlEncoding, special characters (/ and +) are directly put in the url. So, I get the error :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;javax.servlet.ServletException: Input length must be multiple of 8 when decrypting with padded cipher&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually, I use an authentification filter underlying the rest API of ArcGIS Server, writter in Java. So I have to modify it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Feb 2012 06:34:14 GMT</pubDate>
    <dc:creator>KevinLECOCQ</dc:creator>
    <dc:date>2012-02-03T06:34:14Z</dc:date>
    <item>
      <title>dynamic layer using a token</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamic-layer-using-a-token/m-p/34420#M896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to load a dynamic layer in my silverlight application, using a token.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My token contains of special characters like '/'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I create my ArcGISDynamicMapServiceLayer, I have to use HttpUtility.UrlEncode to convert '/' in '%2f'. Then I add my layer to my map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;This method allows to execute the request '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://.../arcgis/rest/services/.../Mapserver?f=json&amp;amp;token=" rel="nofollow" target="_blank"&gt;http://.../arcgis/rest/services/.../Mapserver?f=json&amp;amp;token=&lt;/A&gt;&lt;SPAN&gt;...' successfully.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;But each next request like '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://.../arcgis/rest/services/.../Mapserver/export?bbox=...&amp;amp;token=" rel="nofollow" target="_blank"&gt;http://.../arcgis/rest/services/.../Mapserver/export?bbox=...&amp;amp;token=&lt;/A&gt;&lt;SPAN&gt;...' fails because my token is re-encoded in HTML.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, the character '/' become '%252f.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, what I'm doing wrong ? Why the Silverlight API encode URLs/tokens only for requests like "export", "tile", ... and not the "MapServer" ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 12:41:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamic-layer-using-a-token/m-p/34420#M896</guid>
      <dc:creator>KevinLECOCQ</dc:creator>
      <dc:date>2012-02-02T12:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic layer using a token</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamic-layer-using-a-token/m-p/34421#M897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; I have to use HttpUtility.UrlEncode to convert '/' in '%2f'.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why do you have to use UrlEncode? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;The normal behavior is that a layer such as: &amp;lt;esri:ArcGISDynamicMapServiceLayer Token="mytokenwith/inthemiddle" Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;.....&amp;nbsp;&amp;nbsp;&amp;nbsp; should work.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which error do you get without using UrlEncode?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 14:40:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamic-layer-using-a-token/m-p/34421#M897</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2012-02-02T14:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic layer using a token</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamic-layer-using-a-token/m-p/34422#M898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I only use url="..." and token="..." without UrlEncoding, special characters (/ and +) are directly put in the url. So, I get the error :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;javax.servlet.ServletException: Input length must be multiple of 8 when decrypting with padded cipher&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually, I use an authentification filter underlying the rest API of ArcGIS Server, writter in Java. So I have to modify it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 06:34:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamic-layer-using-a-token/m-p/34422#M898</guid>
      <dc:creator>KevinLECOCQ</dc:creator>
      <dc:date>2012-02-03T06:34:14Z</dc:date>
    </item>
  </channel>
</rss>

