Select to view content in your preferred language

Can't print secured services with FlexViewer 3.0 print widget

3132
12
08-20-2012 02:28 PM
KellieVlastos
New Contributor
I am unable to print my secured services with FlexViewer 3.0 print widget.  Once I try to click print I get the error message:

Error executing print task:

[RPC Fault faultString="Unable to complete operation." faultCode="400" faultDetail="Error executing tool.: Layer "Crude": Unable to connect to map server at http://159.238.133.6/wpaarcgis/rest/services/Crude/MapServer?token=R73QSw9y-5RiLKTZ1dkJ5NX7nX6NEbrh6......
Failed to execute (Export Web Map).
Failed to execute (Export Web Map Task)."]

I initially had problems getting the print widget to work until I used my IP address to reference it.  The print widget did not like my domain name.  All works well with any of my un-secured services. 

Thanks in advance for any help or insight,

Kellie V.
Tags (2)
0 Kudos
12 Replies
MattPohl
Frequent Contributor
I as well have this same issue occurring when trying to print secure services. Getting this one figured out would be huge check on my to-solve list. Any thoughts from the community or Flex Team would be much appreciated.

Thanks,

Matt
0 Kudos
DasaPaddock
Esri Regular Contributor
0 Kudos
ZacharyHart
Honored Contributor
Please see this help page:
http://resources.arcgis.com/en/help/main/10.1/#/Printing_maps_that_contain_secured_services/01540000...



That article only points to longterm/built-in tokens....I'm still having issues with what seems to be the initial log-in credentials not being passed to the print task.
0 Kudos
ZacharyHart
Honored Contributor
Please see this help page:
http://resources.arcgis.com/en/help/main/10.1/#/Printing_maps_that_contain_secured_services/01540000...


Dasa,

I'm not sure what the other 2 users said that made you certain that the above article would solve the particular problem? The article is specific in that it only addresses long-term/built-in token...not short-lived tokens which is what the other users may be experiencing and is the case for my situation.

The credentials for the secured map services are clearly being authenticated (by the identity manager) as the map services display just fine. I too receive a nearly identical error as kvlastos152 describes...it gives and error for each secured map service when i try to print...unfortunately I cannot find a way to copy from error dialog's in flex.

Base maps with no services will print just fine.

I have spent the last 2 days with tech support trying to resolve this issue with no success. I would greatly appreciate any fresh perspective on this as it is clear to me that:

  1. Web searches indicate this is a common issue

  2. Tech support does not know how to resolve the issue.

0 Kudos
DasaPaddock
Esri Regular Contributor
Does it print fine if you turn off security on your service? If not, then it's probably a different problem.

What is the URL to your print service? That server needs to be able to connect to your service.

Can you use a tool like HttpFox to see the print request and response?

The client should be sending the short term token as part to the url in the Web_Map_as_JSON parameter.
0 Kudos
DasaPaddock
Esri Regular Contributor
Here's a working example. The login is: user1/user1

map config:

    <map esrilogovisible="true" openhandcursorvisible="true" scalebarvisible="true" zoomslidervisible="false" wraparound180="true" addarcgisbasemaps="true" initialextent="-13458291.5379666 4173046.713184668 -13425614.70837473 4191582.6925437986" wkid="102100" top="40">
        <operationallayers>
            <layer type="dynamic" label="SaveTheBay" url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/SaveTheBay/MapServer" visible="true"/>
        </operationallayers>
    </map>


print widget config:

<?xml version="1.0" ?>
<configuration>
    <taskurl>http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task</taskurl>
    <title visible="false"/>
    <copyright visible="false"/>
    <author visible="false"/>
    <usescale visible="true"/>
</configuration>
0 Kudos
ZacharyHart
Honored Contributor
Here's a working example. The login is: user1/user1

map config:

    <map esrilogovisible="true" openhandcursorvisible="true" scalebarvisible="true" zoomslidervisible="false" wraparound180="true" addarcgisbasemaps="true" initialextent="-13458291.5379666 4173046.713184668 -13425614.70837473 4191582.6925437986" wkid="102100" top="40">
        <operationallayers>
            <layer type="dynamic" label="SaveTheBay" url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/SaveTheBay/MapServer" visible="true"/>
        </operationallayers>
    </map>


print widget config:

<?xml version="1.0" ?>
<configuration>
    <taskurl>http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task</taskurl>
    <title visible="false"/>
    <copyright visible="false"/>
    <author visible="false"/>
    <usescale visible="true"/>
</configuration>


Yes, everything is configured properly...i have tried it without any security as well...still a 400 error.
0 Kudos
DasaPaddock
Esri Regular Contributor
Maybe it's a firewall problem where your print server can't make a HTTP request to your service?

What is the URL to your print service? That server needs to be able to connect to your service.

Can you use a tool like HttpFox to see the print request and response?

I'd focus on getting it working without security turned on or with a unsecured test service on your server first.
0 Kudos
ZacharyHart
Honored Contributor
Does it print fine if you turn off security on your service? If not, then it's probably a different problem.

What is the URL to your print service? That server needs to be able to connect to your service.

Can you use a tool like HttpFox to see the print request and response?

The client should be sending the short term token as part to the url in the Web_Map_as_JSON parameter.


it is passing a token...you can see the token listed in the error in the viewer...on error for each secured service.


print task and map services on the same GIS server....and furthermore, (and it shouldn't matter) both the GP service and Map service are secured with the same role.

If i knew more what to look for in the HTTPFox it could be of more help.
0 Kudos