Select to view content in your preferred language

Unable to load proxy

16449
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
JohnGravois
Frequent Contributor
just to chime in, i have seen problems on my own machine specifically forwarding content from google (even when mustMatch is set to "false" in the proxy).  yahoo.com and esri.com seem to provide consistent results.


http://domainname/proxy/proxy.ashx?http://www.google.com
fails intermittently

http://domainname/proxy/proxy.ashx?http://www.yahoo.com
succeeds consistently
0 Kudos
SmaranHarihar
New Contributor III


http://domainname/proxy/proxy.ashx?http://www.yahoo.com
succeeds consistently


I tried using yahoo.com but it continues to show the same error. Here is the link, http://msgist2011.grd.arizona.edu/proxy/proxy.ashx?http://www.yahoo.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?


I did see that my "mustmatch" was set to 'true', so I changed it to 'false', but it seems to still give me the error Unable to Load Proxy. I have also included the service that I wish to access.

Now, whenever I access my wwwroot folder on the server by mapping it to my system (my school system), I simply place my html file in the root folder and I can view them on the browser. Meaning I do not need to goto the IIS Manager and deploy it as an application, it happens as I move the app folder into the root. So i am thinking that, this particular proxy page is also being deployed as a HTML Page rather than 'Script Only' like in the image (as shown in the esri resource page). I am confused on that, so I am trying to get in touch with my admin.

In the mean time I tried to do the same thing by adding the proxy to my wwwroot on my local machine and even it was not able to connect to the google.com but it did give a detailed error. Here is the html file, https://www.dropbox.com/s/7qnwhx0cxw7qqrj/test.html (try to download it and then open as the link will only give you the HTML tags). Does this help?
0 Kudos
JohnGravois
Frequent Contributor
not sure if this has been resolved, but check your MIME types in IIS, add ashx


i think TOVernon was on the right track.  a 404.3 error ("It is possible that a handler mapping is missing.") usually indicates that you don't have a script handler in place for .ashx files.

in IIS, under Handler Mappings, do you see entries for "*.ashx"?
0 Kudos
SmaranHarihar
New Contributor III
i think TOVernon was on the right track.  a 404.3 error ("It is possible that a handler mapping is missing.") usually indicates that you don't have a script handler in place for .ashx files.

in IIS, under Handler Mappings, do you see entries for "*.ashx"?


[ATTACH=CONFIG]17948[/ATTACH]

This is how my Handler Mapping looks. Should I "Add Managed Handler" and enter the *.ashx to it?
0 Kudos
JohnGravois
Frequent Contributor
yup.  you're definitely missing handlers for .ashx files.  if you follow the steps in the IIS install requirements for ArcGIS Server article below to add additional IIS components, it should help you get your proxy up and running.

Vista/Windows 7 IIS requirements
http://help.arcgis.com/en/arcgisserver/10.0/install_guide/arcgis_server_net_install_guide/index.html...

the specific items which will help are included in WWW Services > Application Development Features

    .NET Extensibility
    ASP.NET
    ISAPI Extensions
    ISAPI Filters
BrettGreenfield__DNR_
Occasional Contributor II
Slight thread-highjack, but with this post active I felt this didn't deserve its own topic...

I had set up a proxy page on my local machine, and it had been working fine for the past two weeks.  I've been working with IT here to try to get the proxy page set up on our servers, and when they were having issues they sent someone down to view the proxy page on my machine to see how I set mine up, and guess what?  It no longer works!  I have changed absolutely nothing about my proxy page or my IIS settings; .ashx is enabled in handler mappings, mustmatch is set to false, but any time I try to access a URL through the proxy page, I'm getting an error that says "Proxy.config file does not exist at application root, or is not readable."  - which is BS, because the proxy.config file is definitely there and nothing about the file or the directory it sits in has been touched.

I turned on debugging and you can see the results attached.  Any ideas as to what's going on here?
0 Kudos
AdrianMarsden
Regular Contributor II
I was having similar issues - 500 server errors.

I finally did as was suggested here, loaded the proxy page with a valid URL parameter - I did it on the server so I got the real error messages - I got
 Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

Source File: D:\zzzz\test\web.config    Line: 4


The web config seems to have been generated from Visual studio when I tried the debugger from there - it isn't required in any way by my site, as it is purely javascript.  deleting this file totally clears it all up and it works, Fiddler is showing nice clean requests going via the proxy page.

ACM


0 Kudos
hcgis
by
New Contributor III
Slight thread-highjack, but with this post active I felt this didn't deserve its own topic...

I had set up a proxy page on my local machine, and it had been working fine for the past two weeks.  I've been working with IT here to try to get the proxy page set up on our servers, and when they were having issues they sent someone down to view the proxy page on my machine to see how I set mine up, and guess what?  It no longer works!  I have changed absolutely nothing about my proxy page or my IIS settings; .ashx is enabled in handler mappings, mustmatch is set to false, but any time I try to access a URL through the proxy page, I'm getting an error that says "Proxy.config file does not exist at application root, or is not readable."  - which is BS, because the proxy.config file is definitely there and nothing about the file or the directory it sits in has been touched.

I turned on debugging and you can see the results attached.  Any ideas as to what's going on here?


hi Brett
I just see your post now , i hope that it's not too late but you must verify the MapPath in GetFilename function , if the proxy is under a subfolder it will not be loaded you must put
 return context.Server.MapPath("~/subfolder/proxy.config");

public static string GetFilename(HttpContext context)
    {
        return context.Server.MapPath("~/proxy.config");
    
    
    }


Regards
0 Kudos
hcgis
by
New Contributor III
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


William,
I have a similar issue
i have many secure mapservices with token and are loaded perfectly to the map without problem
The problem appears when performing a queytask or identifytask
the mapservices are loaded by the proxy and i can access the layers like :
http//webserver/proxy.ashx?http://webserver/ArcGIS/rest/services/Basemap/Mapserver/0

But i canno't access the query page:
http//webserver/proxy.ashx?http://webserver/ArcGIS/rest/services/Basemap/Mapserver/0/query
Please ,is there any solution for this, It's very urgent

Regards
0 Kudos
hcgis
by
New Contributor III
William,
I have a similar issue
i have many secure mapservices with token and are loaded perfectly to the map without problem
The problem appears when performing a queytask or identifytask
the mapservices are loaded by the proxy and i can access the layers like :
http//webserver/proxy.ashx?http://webserver/ArcGIS/rest/services/Basemap/Mapserver/0

But i canno't access the query page:
http//webserver/proxy.ashx?http://webserver/ArcGIS/rest/services/Basemap/Mapserver/0/query
Please ,is there any solution for this, It's very urgent

Regards


Sorry, i forgot to mention that i use https for all urls
0 Kudos