Select to view content in your preferred language

Editing map using Proxy

6951
20
09-27-2011 08:10 PM
shwetakunjadia
Emerging Contributor
Hi All,

I am using arcgis server 10..
Javascript api 2.5
Editing map sample
I followed all steps to create Proxy on arcgis server..
I am not able to add any feature on map 😞


Error on fire  bug:

Error: Unable to load http://arcgis:8399/proxy/proxy.jsp?http://arcgis:8399/arcgis/rest/services/app1/FeatureServer/18/app... status:0
()?v=2.5 (line 14)
undefined = "[object Object]"
()?v=2.5 (line 14)
()?v=2.5 (line 14)
undefined = "-2"
(function(){var _1=null;if((_1||(typeo...etTimeout(dojo._loadInit,100);}})();

Please help me where i am going wrong ???
0 Kudos
20 Replies
shwetakunjadia
Emerging Contributor
- have you tried insert feature from rest page?
- have you configurated serverUrls in page proxy?
- can you do debug on page.jsp calling page  http://arcgis:8399/proxy/proxy.jsp?h.../18/applyEdits ?



Yes i have tried to insert/edit/delete feature from rest page and its working properly..
i have configured serverUrls in proxy.jsp page as well.
Still its not working
0 Kudos
shwetakunjadia
Emerging Contributor
Finally Done..........

Thanks to All .......


Shweta
0 Kudos
PreranaDoshi
Emerging Contributor
I am also interested in solution. Kindly share.

Thanks
0 Kudos
DavidHollema
Deactivated User
I struggled with the same "Error: Unable to load [url]/proxy.ashx?\requestUrl] status:500 http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.5compact".  I was attempting to perform an edit operation on a feature service (simply create a point feature).  I experimented with some different web app/proxy configurations and here's what I found.

My environment

  • ArcGIS Server 10 SP2 on Server A delivering map services, Windows Server 2008

  • ESRI Javascript api (v2.5 compact) web app on Server B performing feature editing, Windows Server 2008, IIS 7, .net 4.0 installed and .net 4 asp.net registered with IIS

  • Default website is bound to port 80.


The only configuration that worked is when the proxy page and proxy config live in the same folder on disk as the web application and therefore were served under the same website or IIS/ASP application.  I'd like to understand the reasons if anyone can offer assistance.  Note, my GIS server is remote, i.e., not on the same machine as the web server.  I did not attempt to place the proxy files on the GIS Server; my result set for that scenario is nonexistent.
0 Kudos
DavidHollema
Deactivated User
Additional finding.  From what I can tell, the proxy pages need to exist in the same folder on disk as the root of the web application.  For my MVC project this location maps to the same folder on disk as Global.asax.  So, regardless of where my javascript code looks for the proxy page...

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

...if the proxy page does not exist in the Web app root, the editor's ajax call fails with status 500.

I struggled with the same "Error: Unable to load [url]/proxy.ashx?\requestUrl] status:500 http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.5compact".  I was attempting to perform an edit operation on a feature service (simply create a point feature).  I experimented with some different web app/proxy configurations and here's what I found.

My environment

  • ArcGIS Server 10 SP2 on Server A delivering map services, Windows Server 2008

  • ESRI Javascript api (v2.5 compact) web app on Server B performing feature editing, Windows Server 2008, IIS 7, .net 4.0 installed and .net 4 asp.net registered with IIS

  • Default website is bound to port 80.


The only configuration that worked is when the proxy page and proxy config live in the same folder on disk as the web application and therefore were served under the same website or IIS/ASP application.  I'd like to understand the reasons if anyone can offer assistance.  Note, my GIS server is remote, i.e., not on the same machine as the web server.  I did not attempt to place the proxy files on the GIS Server; my result set for that scenario is nonexistent.
0 Kudos
DavidHollema
Deactivated User
I suspect part of my confusion is the proxy page must live on the same domain and same port as suggested in esri help -> http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/ags_proxy.htm

esri.config.defaults.io.proxyUrl = "http://samedomain:sameport/proxy/proxy.jsp";
        //absolute - if proxy.jsp is in another application in the same domain


Additional finding.  From what I can tell, the proxy pages need to exist in the same folder on disk as the root of the web application.  For my MVC project this location maps to the same folder on disk as Global.asax.  So, regardless of where my javascript code looks for the proxy page...

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

...if the proxy page does not exist in the Web app root, the editor's ajax call fails with status 500.
0 Kudos
GuangTian
New Contributor
Hi, I have the same problem. Could you please share your solution?
Thank you very much.
0 Kudos
ClaudioSantos1
New Contributor
Hi all,

I was stuck on this issue, then i found a solution for my problem.

I put the configuration of my proxy at the top of proxy.jsp after "try{" then works.

 System.setProperty("http.proxyHost", "<proxy_ip>");
 System.setProperty("http.proxyPort", "<proxy_port>");


[]'s
0 Kudos
ShaikhRizuan
Regular Contributor

Hi,


I am getting error at Stream outputStream = req.GetRequestStream()) saying "The remote name could not be resolved: 'sampleserver3.arcgisonline.com". I have add this URL in my proxy.config http://sampleserver3.arcgisonline.com/ArcGIS/rest/services which is working fine. Also when i try to check with http://[yourmachine]/DotNet/proxy.ashx?http://services.arcgisonline.com/ArcGIS/rest/services/?f=pjso... this URL, it gives the same error.

After setting mustMatch="false" in proxy.config and tried http://[yourmachine]/DotNet/proxy.ashx?http://www.google.com/ this URL, leads to same error.


Working on ArcGIS Javavascript API 3.10.

OS windows 7 Enterpriise edition SP1

IIS 7.5

Anyone know how to fix this issue???

(NOTE :PFA  image for the error)


Regards,

Shaikh Rizuan

Mail: shaikhrizuan@gmail.com

0 Kudos
nicogis
MVP Alum

it looks like a dns problem. From where you run this code do you can do a nslookup on sampleserver3.arcgisonline.com ?

0 Kudos