whistle1973

Secured services and the proxy page -- please help!

Discussion created by whistle1973 on Sep 15, 2011
Latest reply on Sep 22, 2011 by whistle1973
Hello all,

I am trying to consume some of my secured services.  I can so this without a problem by hard coding the token into my url as below:

new esri.layers.ArcGISDynamicMapServiceLayer(<my Map Service> + "?token=" + <my Token>);

This is a pain to keep replacing the token and anyone can view the page regardless of credentials. 

I have included these 2 lines of code into my html.

        esri.config.defaults.io.proxyUrl = "/proxy/proxy.ashx";
        esriConfig.defaults.io.alwaysUseProxy = true;

I assume that I call the maps service as normal; however, I have tried it several ways.  Whenever I launch my application I get returned in firebug:

"NetworkError: 403 Forbidden - http://maps.bgadd.org/proxy/proxy.ashx?http://maps.bgadd.org/esri_sde/rest/services/temp/BaseTest/MapServer?f=json&dpi=96&transparent=true&format=png8&callback=dojo.io.script.jsonp_dojoIoScript1._jsonpCallback"

Does anyone have any ides?  Any help is greatly appreciated.

James

Outcomes