Skip navigation
All People > vanhornsky > Brandon Van Horn's Blog > 2014 > August > 14

Brandon Van Horn's Blog

August 14, 2014 Previous day Next day

Print Task Issues

Posted by vanhornsky Aug 14, 2014

Well today I was working on updating one of my applications. I noticed that the Advanced Print Function stopped working. This is using a Export Web Map Task on an ArcGIS Server 10.1. The weird thing was that it worked on the live app for version 3.4 arcgis api. Anyway some background on the problem. I was getting the following error in my ArcServer Logs:


Layer "Land1": Unable to connect to map server at .../services/Land1/MapServer.

Failed to execute (ExportWebMap). Failed to execute (Export Web Map).



My previous solution was to replace the name of the host to the server name and wa la it worked.

For Example:


for (var p = 0; p <; p++) {

        layer =[p]);

        if (layer.visible == true && layer.url) {

            layer.url = layer.url.replace("", "myserver:6080")



This worked great and had no problems. Now all of a sudden upgrade to 3.10 and it quits working.

So after much digging I found a post about editing the hosts file, so I went to look at it to see if this would help.

It is located here: C:\Windows\System32\drivers\etc\hosts

And wouldn't you know it my website was not in there. How long have I been missing this? Huh, well I added my servers ip address and the web site link, and BAAM it worked!


So I added the following format to the hosts file (example only)


So I hope this will help you to solve this issue. Have a great day