Select to view content in your preferred language

Unable to load proxy

16460
21
09-09-2010 12:45 PM
WilliamKimrey
New Contributor II
Hello all,

Got a very strange problem here.  We've moved a website to a new server which has ArcServer10.  So I had to set up the proxy server again.  I've set it up exactly the same way that it was set up on the old server, but for whatever reason it's not working properly.

Here's what's happening:
1)  I click on a map that get the mapPoint and places a graphic on the map.
2)  I use a GeometryServer to create a buffer around that point and add that to the map.
3)  I use the resulting polygon to query one of the map layers.

The QueryTask is what's failing, but this is the error that it keeps giving me.

"Unable to load http//webserver/proxy.ashx?http://webserver/ArcGIS/rest/services/Basemap/Mapserver/0/query status:500"

If I tell the QueryTask AND the proxy to point to the old server, everything works fine which tells me that there's nothing wrong with the way the tasks are set up or getting the buffer back from the GeometryService.

The only thing that's different about the new setup vs. the old setup is that the new setup is ArcServer10 and that we've enabled Security for GIS Services.

Is there some setting for the proxy.confix or proxy.ashx that I need to set to use the secure services?  Or is there something similar i need to do in code or on IIS7.5?

Any ideas or suggestions would be a great help.

Thanks,
Will
21 Replies
BalzSteinemann
New Contributor
Hi

I had the same Issue. I'm using the proxy to access a FeatuerLayer hosted on a Spatial Data Server.

I removed line 31 to 39 from the proxy.ashx because I don't need a token to access the layer.

After that my proxy seemed to work. When I sent requests through the proxy and direct to the sds the data in the responses matched. The only difference I could find was in the header of the responses.
So I added the following code to the proxy.ashx to append the Header of the response from the SDS to the response from the proxy.


//proxy.ashx

98:  // append header attributes?!
99:  for (int i = 0; i < serverResponse.Headers.Count; i++)
100:     response.Headers.Add(serverResponse.Headers.GetKey(i), serverResponse.Headers.Get(i));


I don't know if it could cause other problems if the whole header is "forwarded" to the client. So I may try to figure out which attribute was missing and caused the problem.

I know my setup is probably a little different. But this solution might help someone else.
EricKriener
Occasional Contributor


I removed line 31 to 39 from the proxy.ashx because I don't need a token to access the layer.

After that my proxy seemed to work.




You sir, are a genius!
0 Kudos