PrintTask is not working after secured Map Service

10355
16
11-18-2014 02:45 PM
tomwang1
Occasional Contributor

In My Silverlight app, PrintTask was working with no problem. But after to set a Map Service to allow "

"{Error code '400': 'Unable to complete operation.'

Error executing tool.: Layer "Custom Layer": Unable to connect to map server at http://myserver/arcgis/rest/services/DynamicMap/MapServer.

Failed to execute (Export Web Map).

Failed to execute (Export Web Map Task).}"

I did set printTask.ProxyURL = Proxy_URL, also with this proxy, I can call the Map Service and display it on my map control with no problem but cannot print with the MapService?? Please help on this!!

Thanks,

Tom

0 Kudos
16 Replies
khairulamri
Occasional Contributor

Hi Tom,

have you tried to check the ArcGIS Server log? if your map service is secured the possibilities cause are ssl, cross domain, or something that make the token is invalid.

the following are samples message related with printing tools service failed

1. if your certificate or cross domain setting not configured properly

The host name in the certificate is invalid or does not match (WinINet ERROR_INTERNET_SEC_CERT_CN_INVALID, 12038), URL = https://gisserver/arcgis/sharing/generateToken/

2. if your GIS Server network (printing tools services) cannot access your map services. for the example below, I have GIS Server machine (local) but doesn't have internet connection. in the other hand client application consumed online map service as basemap. printing tools failed due to the machine cannot access online map service.

Error executing tool.: Layer "defaultBasemap": Unable to connect to map server at http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer........Failed to execute (Export Web Map). Failed to execute (Export Web Map Task).

0 Kudos
tomwang1
Occasional Contributor

Thanks khairul amri!

My printing tool has no problem to print with map services which are not secured. So ???

khairulamri
Occasional Contributor

try to print you secured map services (you will get the errors as you mentioned), after that see the ArcGIS Server log. the error message in ArcGIS server log is the indication for you to know the root cause as I mentioned in previous post.

0 Kudos
tomwang1
Occasional Contributor

Khairul, your help is really appreciated!

I did check the log error. But I don't know what I am missing. My secured map service is successfully showing on my map control with my proxy. I guess that my proxy set correctly. The problem is to print it.

"Layer "Custom Layer": Unable to connect to map server athttp://myserver/arcgis/rest/services/DynamicMap/MapServer.

Failed to execute (Export Web Map)."

0 Kudos
khairulamri
Occasional Contributor

could you share your GIS Server log?

select your printing tools service as source and see the error messages on there. if printing failed, ArcGIS Server should be recorded in the log. we can find the root cause based on the log. I have attached my gis server log as example

printingTools.png

0 Kudos
tomwang1
Occasional Contributor

Thanks a lot for keeping help on this. I have my error msg but i don't know how to solve it.

"Error executing tool.: Layer "Custom Layer": Unable to connect to map server at http://myserver/arcgis/rest/services/DynamicMap/MapServer. Failed to execute (Export Web Map). Failed to execute (Export Web Map Task)."

0 Kudos
SusanJones
Occasional Contributor II

Tom:

Perhaps it might be an idea to put this out to ESRI Technical support to sort out. We have encountered the same issue and in our case it was fixed with the internet security settings and the Local Group Policy. Your issue is proving more difficult to troubleshoot. 

Susan

0 Kudos
tomwang1
Occasional Contributor

Thanks Susan!

0 Kudos
khairulamri
Occasional Contributor

Hi tom,

How you setup the proxy in arcgis server? You have to setup the proxy through arcgis server account.this is the important steps due to arcgis will communicate with the proxy using this account.

ArcGIS Help 10.1

0 Kudos