creating proxy page - arcgis for JS samples

772
1
07-23-2012 03:49 AM
MostafaFouly
New Contributor
i am not quite sure if i should post this thread under ArcGIS API for JS or not, but since the sample that i am referring to is under this topic so i decided posting it here.

i've been trying to adapt the "Attribute Editing" (under Mobile folder) sample on my machine, so as to host it locally and not over esri server.

i had to create a proxy page as as mentioned in the sample documentation:
//This sample requires a proxy page to handle communications with the ArcGIS Server services. You will need to
//replace the url below with the location of a proxy on your machine. See the 'Using the proxy page' help topic
//for details on setting up a proxy page.

the proxy page was created (below the 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">
  <serverUrls>
    <!-- serverUrl options:
            url = location of the ArcGIS Server, either specific URL or stem
            matchAll = true to forward any request beginning with the url
            token = (optional) token to include for secured service
            dynamicToken = if true, gets token dynamically with username and
              password stored in web.config file's appSettings section.
    -->
   
<serverUrl url="http://sampleserver5.arcgisonline.com/ArcGIS/rest/services/"
     matchAll="true"></serverUrl>
    <serverUrl url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/"
               matchAll="true"></serverUrl>
    <serverUrl url="http://server.arcgisonline.com/arcgis/rest/services/"
               matchAll="true"></serverUrl>
<serverUrl url="http://serverapi.arcgisonline.com"
               matchAll="true"></serverUrl>
  </serverUrls>
 
</ProxyConfig>

note: i put the .html file, the .ashx file and the .config file in the same website folder.

but i still get an error when trying to add an issue, does anybody faces the same issue? somebody can help to find out what the problem is?

thx!
mostafa.
0 Kudos
1 Reply
MostafaFouly
New Contributor
just to make it more clear, i allowed the POST request over IIS 7.5 by adding Module Mapping, so the error isn't related to the POST request
0 Kudos