After I change your proxy page to mine, the code works fine. Please see the attached screen shot.
e.g. esriConfig.defaults.io.proxyUrl = "http://<server name>/proxy/proxy.ashx";
In the proxy.config file, make sure you have set the serverURL of your ArcGIS services:
e.g.
<serverUrl url="http://dingo.gapanalysisprogram.com/ArcGIS/rest/services/"
matchAll="true"></serverUrl>
Try to run your application via server URL in the browser: e.g. http://<server name>/bufferTest.html , instead of just double clicking the html file.
Use firebug or fiddler to check if there is any error returns while running the application.
If my webserver is IIS, can I use the proxy.ashx configuration, or do I need the javascript. Here's a link to the proxy file I wrote yesterday, which is apparently not working. Http://www.gap.uidaho.edu/proxy_ags/jsp. Is it sitting in the wrong place?
After I change your proxy page to mine, the code works fine. Please see the attached screen shot.
e.g. esriConfig.defaults.io.proxyUrl = "http://<server name>/proxy/proxy.ashx";
In the proxy.config file, make sure you have set the serverURL of your ArcGIS services:
e.g.
<serverUrl url="http://dingo.gapanalysisprogram.com/ArcGIS/rest/services/"
matchAll="true"></serverUrl>
Try to run your application via server URL in the browser: e.g. http://<server name>/bufferTest.html , instead of just double clicking the html file.
Use firebug or fiddler to check if there is any error returns while running the application.
After I change your proxy page to mine, the code works fine. Please see the attached screen shot.
e.g. esriConfig.defaults.io.proxyUrl = "http://<server name>/proxy/proxy.ashx";
In the proxy.config file, make sure you have set the serverURL of your ArcGIS services:
e.g.
<serverUrl url="http://dingo.gapanalysisprogram.com/ArcGIS/rest/services/"
matchAll="true"></serverUrl>
Try to run your application via server URL in the browser: e.g. http://<server name>/bufferTest.html , instead of just double clicking the html file.
Use firebug or fiddler to check if there is any error returns while running the application.
When I run the query in Aptana it works great, but when I try to run it through the browser, the query fails. Here's the error message from Firefox:
"Error: Unable to load http://dingo.gapanalysisprogram.com/proxy.ashx?http://dingo.gapanalysisprogram.com/ArcGIS/rest/servi... status:0
Error(undefined=""Unable to load http://...erver/0/query status:0"") (line 0)
undefined = ""Unable to load http://...erver/0/query status:0""
Here are something you can check:
1. Did you put your html in the IIS wwwroot folder?
2. Did you run the html via http://gap.uidaho.edu/xxx.html
3. Did you put both the proxy.ashx and proxy.config files in the IIS wwwroot folder?
4. Did you change the code in the html to refer to the correct proxy page.
5. Try to clear the browser cache.
6. I just checked your other application. Firebug returns error shows not able to load the proxy page.
Thank you so much! When I put the html file into the IIS wwwroot folder of the same computer that is hosting the arcgis services, it works perfectly. I can live with this! However, how would I need to configure this if the webserver and the arcgis servers are different machines?