<?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 Proxy.ashx Basic Authentication in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/proxy-ashx-basic-authentication/m-p/603979#M56561</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We have downloaded the proxy.ashx files to interface with ArcGIS services.&lt;/P&gt;&lt;P&gt;Our setup is&lt;/P&gt;&lt;P&gt;Javascript -&amp;gt; Proxy Handler -&amp;gt; ArcGIS services.&lt;/P&gt;&lt;P&gt;The proxy code works well in Token based authentication.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We updated the proxy.ashx code to enable Basic Authentication.&lt;/P&gt;&lt;P&gt;The proxy returns the response to the client as expected&lt;/P&gt;&lt;P&gt;But the Base Map does not get loaded.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the code&lt;/P&gt;&lt;P&gt;function init() {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; esriConfig.defaults.io.proxyUrl = proxyURL&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; esriConfig.defaults.io.alwaysUseProxy = true;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;function LoadMap() {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; init();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var evt, XY;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var&amp;nbsp; layer = new esri.layers.ArcGISDynamicMapServiceLayer(Basemap URL);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wkidref = wkid;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //initialze the map control&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map = new esri.Map("map");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.addLayer(layer);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.on("load", function () { map.extent = layer.fullExtent });&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We inspected the layer value and the proxy was returning the json as expected.&lt;/P&gt;&lt;P&gt;The load of the base map does not seem to happen on load function call. We noticed that the call to export the image does not take place on load&lt;/P&gt;&lt;P&gt;Can anyone assist on this issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Jan 2015 10:49:41 GMT</pubDate>
    <dc:creator>KarthikBalachandran</dc:creator>
    <dc:date>2015-01-07T10:49:41Z</dc:date>
    <item>
      <title>Proxy.ashx Basic Authentication</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/proxy-ashx-basic-authentication/m-p/603979#M56561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We have downloaded the proxy.ashx files to interface with ArcGIS services.&lt;/P&gt;&lt;P&gt;Our setup is&lt;/P&gt;&lt;P&gt;Javascript -&amp;gt; Proxy Handler -&amp;gt; ArcGIS services.&lt;/P&gt;&lt;P&gt;The proxy code works well in Token based authentication.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We updated the proxy.ashx code to enable Basic Authentication.&lt;/P&gt;&lt;P&gt;The proxy returns the response to the client as expected&lt;/P&gt;&lt;P&gt;But the Base Map does not get loaded.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the code&lt;/P&gt;&lt;P&gt;function init() {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; esriConfig.defaults.io.proxyUrl = proxyURL&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; esriConfig.defaults.io.alwaysUseProxy = true;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;function LoadMap() {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; init();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var evt, XY;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var&amp;nbsp; layer = new esri.layers.ArcGISDynamicMapServiceLayer(Basemap URL);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wkidref = wkid;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //initialze the map control&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map = new esri.Map("map");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.addLayer(layer);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.on("load", function () { map.extent = layer.fullExtent });&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We inspected the layer value and the proxy was returning the json as expected.&lt;/P&gt;&lt;P&gt;The load of the base map does not seem to happen on load function call. We noticed that the call to export the image does not take place on load&lt;/P&gt;&lt;P&gt;Can anyone assist on this issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 10:49:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/proxy-ashx-basic-authentication/m-p/603979#M56561</guid>
      <dc:creator>KarthikBalachandran</dc:creator>
      <dc:date>2015-01-07T10:49:41Z</dc:date>
    </item>
  </channel>
</rss>

