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.
//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));
William,I have a similar issuei have many secure mapservices with token and are loaded perfectly to the map without problemThe problem appears when performing a queytask or identifytaskthe mapservices are loaded by the proxy and i can access the layers like :http//webserver/proxy.ashx?http://webserver/ArcGIS/rest/services/Basemap/Mapserver/0But i canno't access the query page:http//webserver/proxy.ashx?http://webserver/ArcGIS/rest/services/Basemap/Mapserver/0/queryPlease ,is there any solution for this, It's very urgentRegards
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
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?
return context.Server.MapPath("~/subfolder/proxy.config");
public static string GetFilename(HttpContext context) { return context.Server.MapPath("~/proxy.config"); }
Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive. Source File: \zzzz\test\web.config Line: 4
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"?
not sure if this has been resolved, but check your MIME types in IIS, add ashx
http://domainname/proxy/proxy.ashx?http://www.yahoo.comsucceeds consistently
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?
It gives me a Runtime Error. You can see it yourself, http://msgist2011.grd.arizona.edu/proxy/proxy.ashx?http://www.google.com
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...
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.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.