Select to view content in your preferred language

Proxy.ashx Basic Authentication

7951
0
01-07-2015 02:49 AM
KarthikBalachandran
Deactivated User

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?

0 Kudos
0 Replies