Print Widget - Error: Unable to connect to map server ...

5507
11
Jump to solution
12-06-2016 08:50 AM
Alexwang
Occasional Contributor II

Hello, I got the following error message when I was trying to use WAB built-in Print Widget with ESRI printing service (Task: Export Web Map Task ). when I hover the error, it told me the "Error executing tool ....... Unable to connect to map server https://..../mymap/myservice/MapServer. ...Failed to execute Web Map Export task"

The map service can be accessed via rest-end point and the web map is shared at org level and can be seen from the application. Are there any other things I need to config to make it work? Thanks for your help!

Tags (1)
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
11 Replies
RobertScheitlin__GISP
MVP Emeritus

Alex,

   Are you mixing https and http urls? Are you printing secured layers? Do you have a proxy setup?

0 Kudos
Alexwang
Occasional Contributor II

Thanks Robert. Yes, the layers from our clients are secured so https://.....

here is what I have for the httpProxy part in the application config.  How to set up a proxy?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Alex,

   Print secured services is a bit of a hassle. Here is some info:

Printing maps that contain secured services—Documentation (10.3 and 10.3.1) | ArcGIS for Server 

Alexwang
Occasional Contributor II

Thank you so much Robert. I'll give it a try. 

0 Kudos
SolomonPulapkura
Occasional Contributor III

Alex did this ever work for you? I've been trying to make the web appbuilder print widget work with both web tier and token based auth...but cant! 

I tried custom print services like the link from Robert but still no luck...

Why is this so hard?

0 Kudos
SolomonPulapkura
Occasional Contributor III

Hi Robert,

That link suggests you need to have token based authentication. What if you have web tier authentication?

I am having the same issue and I am using web tier authentication.

Thanks for any help!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Solomon,

   Sorry I don't have any suggestions for web-tier security.

0 Kudos
JonathanMori1
New Contributor III

I tried this too and zero luck. This shouldn't be such a hard thing to get working.... I've struggled with this for years

0 Kudos
TanuHoque
Esri Regular Contributor

Jonathan Mori

Is that web tier authentication?

If so, you must have your server(s) federated with a portal. See the help link below. With web tier authentication, there is a limitation, at the web architecture level, that does not allow the user identity to flow through. As you know when you submit a request to a print service, like your web maps, it tries to access map/feature/image services to get image/features etc. In order to access those services, a print service must have privilege to access them -- since end users identity does not flow through, it basically relies on token. When your servers are federated to a portal, token gets passed around and print service can access secured services.

Print maps that contain secured services—Documentation (10.7) | ArcGIS Enterprise 

Having said that if you don't have portal and your security requirement is not really a per user level security you can choose one of the following options as last resorts (neither of them are recommended approach and we ask you to opt in to this with ample caution).