Unable to load proxy

16100
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
KellyHutchins
Esri Frequent Contributor
Will,

I've seen issues with the proxy on IIS7 if the ASP.NET 'Windows feature' is not enabled. Here's a link to a Microsoft Knowledge Base article that explains how to enable this:
http://msdn.microsoft.com/en-us/library/aa964620.aspx
WilliamKimrey
New Contributor II
Thanks for the link, Kelly.  Unfortunately, everything that the article suggests has already been implemented.  Just to clarify, we're hosting the application on Server 2008 and will be accessed with Windows 7 machines.

There is something else that could cause the issue.  The Website itself is not under C:\inetpub\wwwroot.  It's located on another drive on the server and set as another website in IIS.  So, in IIS7.5, under the "Sites" folder, there's "Default Web Site" and "MyWebSite". It's the "MyWebSite" that's being accessed, but the ArcGIS folder is located in the "Default Web Site".  This doesn't seem to bother the Map Services for anything else, but I wonder if the proxy is having trouble with this.  I am setting the proxyUrl in the Javascript to the absolute path though so I didn't think it'd have that much trouble.
0 Kudos
WilliamKimrey
New Contributor II
Here's an update to this topic.

I'm almost positive that what is failing is my QueryTask when I'm passign a buffer result as the geometry.  So, i took a step back and incremented my buffer in steps and sure enough after it got big enough, the query task failed.  This leads me to believe that there are too many rings being passed as the geometry of the Query.

So, instead of using the buffer to query, I'm using the Extent of the buffer.  This is a temporary fix at best because it does return results that are outside of the buffer, but for now this is acceptable.

I would still like to know the exact reason why this is now failing in Javascript 2.0 (was working fine in 1.6).  Is it the proxy?  is it the GeometryService? the QueryTask?

I mainly need to know if this is the fault of the proxy or not so that I'll know for future applications and if it is the proxy, how to either fix it, or configure the proxy to work properly.
0 Kudos
AaronNash
New Contributor
not sure if this has been resolved, but check your MIME types in IIS, add ashx
0 Kudos
AndreasHoogeveen
New Contributor II
I was getting the same error. What helped for me was editing the proxy.config file. It has an option to limit the "target" services to a list mentioned in the config file, or not: <ProxyConfig mustMatch="false">. If true, only services that are listed are available for access through the proxy. If false, all url's are valid. So either change this option, or add your targeted service to the list.
SmaranHarihar
New Contributor III
Did anybody get the solution for this?

I am also getting the same 500 error and if I try to goto the http://domainname/proxy.proxy.ashx it gives me Runtime Error, Server Error in '/' Application.

Is this right? I have deployed the proxy.ashx but not sure where I am going wrong?

I am using it for print task.
0 Kudos
AndreasHoogeveen
New Contributor II
Did anybody get the solution for this?

I am also getting the same 500 error and if I try to goto the http://domainname/proxy.proxy.ashx it gives me Runtime Error, Server Error in '/' Application.

Is this right? I have deployed the proxy.ashx but not sure where I am going wrong?

I am using it for print task.


Check out the file proxy.config. Like I described above, you can provide the URLs for which the proxy is valid in the proxy.config; or specify that all URLs are valid ("mustmatch=false"). The fact that you get a 500 if you type in the url as you described, doesn't neccesarily mean that the proxy doesn't work as it should. Try entering a target URL after the "proxy.ashx", such as [url]http://domainname/proxy/proxy.ashx?http://www.google.com[url] and see what happens...
SmaranHarihar
New Contributor III
Check out the file proxy.config. Like I described above, you can provide the URLs for which the proxy is valid in the proxy.config; or specify that all URLs are valid ("mustmatch=false"). The fact that you get a 500 if you type in the url as you described, doesn't neccesarily mean that the proxy doesn't work as it should. Try entering a target URL after the "proxy.ashx", such as [url]http://domainname/proxy/proxy.ashx?http://www.google.com[url] and see what happens...


It gives me a Runtime Error. You can see it yourself, http://msgist2011.grd.arizona.edu/proxy/proxy.ashx?http://www.google.com
0 Kudos
AndreasHoogeveen
New Contributor II
It gives me a Runtime Error. You can see it yourself, http://msgist2011.grd.arizona.edu/proxy/proxy.ashx?http://www.google.com


The error you provided shows that the webserver is configured to not show the original error. Can you try to access the URL while working on the webserver (through remote desktop connection)? If you can, you will see a more detailed error, describing the actual problem. Besides that: can you take a look at the proxy.config and see if the mustmatch option is set to false or that the service you are trying to access is mentioned in the list with services?
0 Kudos