Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm writing a web service that will interface with ArcGIS. One of the requirements is to put: = "proxy.ashx";

in the JavaScript portion of the page. Of course, it says "esri is undefined" if I don't include the library that defines "esri". Question: Where do I get this library at? I've searched all over the internet and couldn't find anything! Thanks!

share|improve this question is the javascript and see… for proxy setup – Mapperz May 13 '13 at 20:29
@Mapperz if you put this as an answer I'll mark it as the right answer. – Mike Marks May 13 '13 at 20:38
thank you for the info as well – Mike Marks May 13 '13 at 20:38
added as an answer on @Mike Marks request – Mapperz May 13 '13 at 20:57
up vote 5 down vote accepted

Javascript location [Current as 13/05/2013]

For the proxy settings

note the code: = true;

<script type="text/javascript">
    var map;
    function Init() { = true; = "http://WebServerName/proxy.ashx";"map"), { width: dojo.contentBox("map").w + "px", height: (esri.documentBox.h - dojo.contentBox("navTable").h - 40) + "px" });
        map = new esri.Map("map");

        var CountyDataLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://Server.Name/ArcGIS/rest/services/Counties/MapServer");

        var RestrictedLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://Server.Name/ArcGIS/rest/services/cadaster/ServiceName/MapServer");

        var resizeTimer;
        dojo.connect(map, 'onLoad', function(theMap) {
            dojo.connect(dijit.byId('map'), 'resize', function() {
                resizeTimer = setTimeout(function() {
                }, 500);

... and I used the following code in my proxy.config file:


<?xml version="1.0" encoding="utf-8" ?>
<!-- Proxy config is used to set the ArcGIS Server services that the proxy will forward to.        
        mustMatch: true to only proxy to sites listed, false to proxy to any site -->
<ProxyConfig mustMatch="true">

        <serverItem url="http://Server.Name"
                    matchAll="true" tokenUrl="http://Server.Name/ArcGIS/tokens"
                    username="MyUserName" password="MyPassword"
                    timeout="5" />


this code is taken from

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.