Question regarding the proxypage!

810
3
07-25-2011 12:48 PM
DanDong
New Contributor
Hi guys,

I am using proxypage to avoid the cross-domain issue to save images from multiple map services.

In proxypage:
<serverItem url="http://rmms-dev.atlas.illinois.edu/ArcGIS/rest/services"
                matchAll="true" />


In xaml:
<esri:ArcGISDynamicMapServiceLayer ID="Images"
                  Url="http://rmms-dev.atlas.illinois.edu/ArcGIS/rest/services/ecocat_images/MapServer" Visible ="False"
                  Initialized="ArcGISDynamicMapServiceLayer1_Initialized" InitializationFailed="AGS1_failed" ProxyURL="../proxy.ashx"/>
<esri:ArcGISDynamicMapServiceLayer ID="Visible Layers"
                  Url="http://rmms-dev.atlas.illinois.edu/ArcGIS/rest/services/wirt/MapServer" 
                  Initialized="ArcGISDynamicMapServiceLayer_Initialized" InitializationFailed="AGS_failed" ProxyURL="../proxy.ashx"/>


I implement a GoTo tool which is using a textbox to accept a zip code and then zoom into that area (this is a find task), in the meanwhile, turn three layers (from the 'Visible Layers') visible and also turn the 'Images' map service to be visible.

Then I found a confusing issue. If I include the ProxyURL in the above two map services (red words), once I enter the zip code and click the button to do the work, I get a web error. I attache the error from fiddler [ATTACH]7914[/ATTACH]. The three layers and another map service cannot be turn visible.

If I don't include the ProxyURL, I will not get this error and three layers and another map service can be turn visible.

I am thinking the error may result from the proxy that I use. But I do need to use the proxypage to save the map images from multiple services ....

Anyone run into similar issue or any thoughts on how to solve this issue? Thank you advance!
0 Kudos
3 Replies
DaveRabrun
New Contributor
Hi,

When i use a proxy page, i use the absolute path as opposed to the relative path.

But after examining the image more closely, that doesn't seem to be the issue because your proxy works twice towards the end to retrieve images. Your proxy.ashx file might be incorrectly handling text/html. You'll have to debug your proxy.ashx file and find out where it is failing with export map calls and why it is not failing with image calls.
0 Kudos
DanDong
New Contributor
Hey Dave, thank you. I will debug that file and see what I can get. I also need to add another thing that I find out. Under such condition: the proxyurl is included in the xaml and I get web error when I use the find tool. If I zoom in/out after the map is initialized and then I use the find tool, there won't be any error. That's the other part confused me very much. It looks like after the map initialization, I must firstly do something with the extent, then I won't get any error.
0 Kudos
DanDong
New Contributor
Any thoughts or similar experiences are appreciated! 🙂 This proxypage stuff is really brand new to me.
0 Kudos