AnsweredAssumed Answered

Javascript API Note getting token wit proxy.

Question asked by cadgis on Feb 21, 2018
Latest reply on Feb 21, 2018 by cadgis

I have configured  proxy and trying to consume a secured layer through proxy in Arcgis javascript.

When I test  the proxy manually i get the response  in web browser. That is to to say,  when I enter the following Url in the broweser it returns a valid token :-




  URL :



But through Javascript , gives an error : error Error: Token Required

Javascript : = "http://localhost/DotNet/proxy.ashx"; = false;

urlSecuredlayer = "";
Securedlayer = new esri.layers.FeatureLayer(urlSecuredlayer, { id: "urlSecuredlayer", mode: esri.layers.FeatureLayer.MODE_ONDEMAND, outFields: ["*"] });

    tiledLayer1 = new ArcGISTiledMapServiceLayer(urlsatellite, { id: "SatelitteMap" });;

    var states_Symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, 
                   new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,  
                   new dojo.Color([255, 32, 255, 0.35]), 1), 
                   new dojo.Color([255, 65, 125, 0.35]));

    urlSecuredlayer.setRenderer(new esri.renderer.SimpleRenderer(states_Symbol));[Securedlayer]);


Thank you for any help.