AnsweredAssumed Answered

Proxy.ashx Basic Authentication

Question asked by karsail on Jan 7, 2015

Hello,

We have downloaded the proxy.ashx files to interface with ArcGIS services.

Our setup is

Javascript -> Proxy Handler -> ArcGIS services.

The proxy code works well in Token based authentication.

 

We updated the proxy.ashx code to enable Basic Authentication.

The proxy returns the response to the client as expected

But the Base Map does not get loaded.

 

Below is the code

function init() {

    esriConfig.defaults.io.proxyUrl = proxyURL

    esriConfig.defaults.io.alwaysUseProxy = true;

}

function LoadMap() {

    init();

    var evt, XY;

 

      var  layer = new esri.layers.ArcGISDynamicMapServiceLayer(Basemap URL);

       wkidref = wkid;

 

    //initialze the map control

    map = new esri.Map("map");

    map.addLayer(layer);

 

    map.on("load", function () { map.extent = layer.fullExtent });

 

We inspected the layer value and the proxy was returning the json as expected.

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

Can anyone assist on this issue?

Outcomes