2

I am new to use ArcGis Api for javascript, I am using JS Api 3.20. I have been trying for 3 days but it does not work. I have taken code from the following link Geometry Engine - Geodesic buffers | ArcGIS API for JavaScript 3.20 I paste this in My Html file create in VS website for .Net , and setup a local server for my page using IIS server I also downloaded proxy from GitHub resource-proxy/DotNet at master · Esri/resource-proxy · GitHub setup it in same application in IIS Downloaded excel file added in my application from https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.csv but still I am getting the following error in console using developer mode when set Proxy URL to this config.defaults.io.proxyUrl = "/192.168.8.188/Proxy/proxy.ashx";

GET http://192.168.8.188:1555/192.168.8.188/Proxy/proxy.ashx?http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.csv 404 (Not Found)

and when I set proxy url to this config.defaults.io.proxyUrl = "/Proxy/"; then the following error occurs in console

GET http://192.168.8.188:1555/Proxy/?http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.csv 403 (Forbidden)

Could you please help me out. I would be thankful in advance.

2 Answers2

1

I Resolved My Issue thanks.

Basically I didn't enable IIS 4.5 web features so I read readme file of proxy which resolved my issue.

Here is what I read from ReadMe file located in DotNet folder of Proxy

  • Troubleshooting: If you get an error message 404.3, it's possible that ASP.NET have not been set up. On Windows 8, go to "Turn Windows features on or off" -> "Internet Information Services" -> "World Wide Web Services" -> "Application Development Features" -> "ASP.NET 4.5".
0

First off, try setting the proxyUrl value to this:

config.defaults.io.proxyUrl = "/proxy/proxy.ashx";

That may resolve the issue.

EDIT (based on clarification that IIS is in fact running on port 1555):

You might want to confirm that you can access the proxy at all, by entering the proxy url directly in your browser (with no arguments), eg:

http://192.168.8.188:1555/Proxy/proxy.ashx

If this resolves correctly, you should get an error response in JSON format like this:

{error: {code: 400,message:"This proxy does not support empty parameters."}}

That at least would confirm that the proxy is accessible and functioning properly on your system.

Dave Marley
  • 705
  • 6
  • 10
  • I use 1555 port because 80 is used by another process, and in both cases (80 , 1555) I get not found error when requesting http://192.168.8.188:1555/Proxy/proxy.ashx Or http://192.168.8.188/Proxy/proxy.ashx –  Mar 18 '17 at 10:46
  • #Dave Marley When I set Proxy to this one I get not found error config.defaults.io.proxyUrl = "/proxy/proxy.ashx"; –  Mar 18 '17 at 10:52
  • OK makes sense regarding the port. Thx for clarifying. If http://192.168.8.188:1555/Proxy/proxy.ashx doesn't resolve even when entering directly in browser then something must be wrong with your IIS settings for the proxy page/application. Can you open IIS manager, right click on Proxy.ashx and select browse? Does that result in the JSON error showing in your browser as noted in my response? – Dave Marley Mar 18 '17 at 19:19
  • I don't have proxy.ashx in IIS as such because I converted DotNet folder to application named it proxy, while proxy.ashx is located in DotNet folder –  Mar 18 '17 at 19:22