5

I have ArcGIS Server 10.21 on Windows Server 2012 R2, and have created a web application using ESRI JavaScript API v.3.16 that uses the dijit/Print that invokes the Export Web Map task on the server. I have the Printing Tools service running on the server and can print any of the ESRI background maps just fine. However, when I add any of my local feature layers, I get an error that it is unable to complete the process. The error message in the PrintingTools log says that it "failed to create layer from service at http://myServer.myDomain.com/arcgis/rest/services/SampleWorldCities/MapServer/0". If I replace the server URL with the local IP address (ex. 192.168.2.30) then it works fine. Does anyone know what I am doing wrong here?

  • Do you have arcmap on the server machine? If so can you make a user connection to the gIS server with that url? Is there perhaps a load balancer in the mix here? – Simon Apr 27 '16 at 13:39
  • 1
    Since you're running windows, can you view the application from Internet Explorer on the server? Can you view myServer.myDomain.com/arcgis/rest/services/SampleWorldCities/… from the same machine? – raykendo Apr 27 '16 at 14:19
  • 2
    A hacky solution would be to get on your server and add an entry to the hosts file mapping myserver.mydomain.com to 192.168.2.30. en.wikipedia.org/wiki/Hosts_%28file%29 – Kirk Kuykendall Apr 27 '16 at 14:26
  • Sorry, I don't have arcmap on the server. If I am on the server, I can only get to the URL if I use "localhost". If I am on the server, and access the URL with localhost, I get a message stating that it is unable to load the PrintingTools/GPServer/Export Web Map Task. I am not that network savvy so I am not sure what is going on. – Abby G. Apr 27 '16 at 21:52
  • 2
    in general, its a good idea to confirm that the machine where ArcGIS Server is installed is able to access the same resources, qualified in the same way as they are in your application in the browser. this will help you confirm that they can be printed too. – John Gravois Apr 28 '16 at 16:38
1

This is a security related issue. Your Print service hasn't permission to access your Map service. You just give permissions to your print service or make your map service as public. It will be fixed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.