Select to view content in your preferred language

Custom Print Problem

3575
6
Jump to solution
08-30-2013 07:28 AM
RebeccaWatson
Deactivated User
Hello, I'm looking for some help with printing using custom layouts.

I have published my printing service, loaded the print widget in App Builder and set it to use arcServer to print using the following URL

https://mywebserver/arcgis/rest/services/ServiceHolder/CustomPrint/GPServer/Export%20Web%20Map

The service reads in ok and allows me to set the default format and my custom layout template.

The problem comes when I open the print widget in my flex app e.g. https://mywebserver/flexviewers/myviewer
I immediatedly get the error:

Unable to connect to GP Service:
https://mywebserver/arcgis/rest/services/ServiceHolder/CustomPrint/GPServer/Export%20Web%20Map

GIS Server is missing a crossdomain file.
[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTPS"]

We are using a setup as follows:
Windows Domain User Store
ArcGisServer Builtin Role Store
Web Tier Authentication

Despite the error message, there is a crossdomain file at D:\ArcGIS\Server\framework\runtime\tomcat\contexts\rootapp

which reads as follows:

<?xml version="1.0"?>
-<cross-domain-policy>
<allow-access-from domain="*"/>
<site-control permitted-cross-domain-policies="all"/>
<allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>

All my other services are working and accessible and the server has access rights to the folder with my custom layouts in it.
Does anyone have any ideas?

Thanks
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RebeccaWatson
Deactivated User
I have solved my custom print problem.

My services were secured so the credentials had to be embedded in my GPService. See the following for how to solve this:

http://resources.arcgis.com/en/help/main/10.1/#/Printing_maps_that_contain_secured_services/01540000...


Thanks

View solution in original post

0 Kudos
6 Replies
RebeccaWatson
Deactivated User
I have now got the tool to initialise - I was copying and pasting the url for the service from the webserver and it was missing part of the url. However, now I run the tool and just get a message EsriJobFailed.

Does anyone know how I can find the nature of the failure? Or does anyone know of any reasons why it might fail?
0 Kudos
RebeccaWatson
Deactivated User
Just discovered a little tip on another post. If you change the printwidget.xml so that the taskurl is changed to

<taskurl>https://mywebserver/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export Web Map Task</taskurl>

then you get a much more detailed error message. In my case I am getting

Error code 403 User does not have permissions to access 'folder/mymapservice'. Access to the resouce is forbidden, regardless of authorization.

So now I need to research this error and see what I get...
0 Kudos
Cotter
by
Emerging Contributor
Check to make sure that the ArcGIS Server Account is able to access c:\arcgisserver.
Right click the folder ---> properties --> security tab
If the user is not listed, add it and click ok.
0 Kudos
MichaelVolz
Esteemed Contributor
"Check to make sure that the ArcGIS Server (AGS) Account is able to access c:\arcgisserver."

That is if you went with the default configuration.  If you pointed ArcGIS Server to use another drive such as an E-drive, then you want to make sure AGS has access to that location.
0 Kudos
RebeccaWatson
Deactivated User
Thanks for this. I have checked the arcgisserver folder and the server user has full control. I have just noticed some more errors that show up when I load my application. For each operational layer I get the following two errors:

Unable to process request. Error handling service request : java.io.IOException: Server object extension 'featureserver' not found.
Instance of service 'MyMapLayers/MyLayer.MapServer' failed to process a request.

Then, as mentioned before, when I try to run the tool, I get the following:

Layer "MyLayer1": Unable to connect to map server at https://mywebserver/arcgis/rest/services/MyMapLayers/MyLayer1/MapServer.
Layer "MyLayer2": Unable to connect to map server at https://mywebserver/arcgis/rest/services/MyMapLayers/MyLayer2/MapServer.
Layer "MyLayer3": Unable to connect to map server at https://mywebserver/arcgis/rest/services/MyMapLayers/MyLayer3/MapServer.
ERROR: code:403, User does not have permissions to access 'MyMapLayers/MyLayer3.mapserver'., Access to this resource is forbidden, regardless of authorization. Failed to execute (ExportWebMap). Failed to execute (Export Web Map).

The last Error code 403 bit is not specific to MyLayer3, if I take that layer out, it just picks another of the layers and gives that as the Error code 403.

I'm not sure whether the two sets of errors are related because I only get the first two on operational layers, but the tool error refers to basemap and operational layers.
0 Kudos
RebeccaWatson
Deactivated User
I have solved my custom print problem.

My services were secured so the credentials had to be embedded in my GPService. See the following for how to solve this:

http://resources.arcgis.com/en/help/main/10.1/#/Printing_maps_that_contain_secured_services/01540000...


Thanks
0 Kudos