AnsweredAssumed Answered

problem with setting up proxy

Question asked by maiagomez on Apr 22, 2016
Latest reply on Apr 23, 2016 by rscheitlin

I just want to load a map service using proxy. I read all of instructions for setting up proxy and proxy set up problems that are asked but I could not solve my problem.


I did following steps:


1- I downloaded the proxy files for .Net. They are proxy.ashx and proxy.config that I put them in a folder named proxy on

my server under inetpub/wwwroot.


2- I edited proxy.config file to contain the paths to my local services.

<?xml version="1.0" encoding="utf-8" ?>

<ProxyConfig allowedReferers="*"



        <serverUrl url=""





First question: I changed url="" to url="". is it right?


3- I went into IIS Manager and create an application from proxy folder.


My index html code in inetpub/wwwroot:


<!DOCTYPE html>



    <link rel="stylesheet" href="arcgis_js_api/library/3.14/3.14/esri/css/esri.css">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">    

    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">

    <title>Create Map and add a dynamic layer</title>



      html, body, #mapDiv{

        padding: 0;

        margin: 0;

        height: 100%;



    <script src="arcgis_js_api/library/3.14/3.14/init.js"></script>


      var map;









      ], function (

        Map,esriConfig, ArcGISDynamicMapServiceLayer,Extent, ImageParameters) {      

     = "./proxy/proxy.ashx"; = true;     


        var bounds = new Extent({








        map = new Map("mapDiv", {

          extent: bounds



        var dynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer("http://localhost:6080/arcgis/rest/services    /sdeMXD/MapServer", {

          "opacity" : 0.5    








   <div id="mapDiv"></div>




This is the error in firebug:


GET http://localhost:6080/arcgis/rest/info?f=json

200 OK


init.js (line 152)


SyntaxError: expected expression, got '<'                                                                                         proxy.a...allback (line 1)
<%@ WebHandler Language="C#" class="proxy" %> 

                                                                                                                                                     error RequestTimeoutError: Timeout exceeded { message="Timeout exceeded", stack=".cache["dojo/errors/crea...4/3.14/init.js:204:284\n", response={...}, more...}

                                                                                                                                                                       init.js (line 1488)



I spend long time but i could not find out what is wrong with it. I really appreciate it if anybody help me.Thanks in advance

Maria Gomez