PrintTask Error with FeatureLayer selection

2492
13
09-10-2012 07:45 PM
ScottDavis3
New Contributor II
Using ArcServer 10.1 and JSAPI 3.1. Printtask works when selection of a featurelayer under a feature service is empty. After a selection is made the follow error occurs:

Layer "graphicsLayer0": Failed to create layer from service at http://darkside:6080/arcgis/rest/services/TheAddresser/YorkCounty_SDE/FeatureServer/0. Failed to execute (ExportWebMap). Failed to execute (Export Web Map).

This feature service is secured. Anyone have any ideas? Sample code below.

        var printTask = new esri.tasks.PrintTask(url);
        var templateP = new esri.tasks.PrintTemplate();
        templateP.format = "PDF";
        templateP.layout = "85x11";
        templateP.preserveScale = true;
        template.layoutOptions = { titleText: '', authorText: "ME", scalebarUnit: 'Feet', legendLayers: [] };
        var params = new esri.tasks.PrintParameters();
        params.outSpatialReference = map.spatialReference;
        params.map = map;
        params.template = templateP;
        printTask.execute(params, function (result) {
            window.open(result.url);
            hideWorking();
        }, function (err) {
            errorWin(err, 'printMap');
        });
0 Kudos
13 Replies
JulianaCastillo
New Contributor
Did you ever find a solution for this?
I'm having the same issue.

Juliana
0 Kudos
JohnGravois
Frequent Contributor
i was able to reproduce the error you described, so i logged the following defect on your behalf.

[NIM085348: Error is returned when attempting to pass a print request which includes a secure featureLayer with an active selection.]

for others encountering this issue, please feel free to contact technical support and add your name to the list of customers who are affected.  thanks for bringing this to our attention!
0 Kudos
KatieReiter
New Contributor

Has a solution been found for this bug yet?  I am also having the same issue.

0 Kudos
DonCaviness
New Contributor III
Has a solution to this been found? I'm trying to print secure services as well and I'm getting errors.
0 Kudos
JohnGravois
Frequent Contributor
have you followed these instructions to publish a print service specifically for secure content?
0 Kudos
DonCaviness
New Contributor III
I have followed those instructions to create a print service for secured content. However, I get the same error as before.  The print service cannot access my secure services.  Any idea as to what the issue might be?
0 Kudos
JohnGravois
Frequent Contributor
even with the OOTB sample server 6 print service, i can't reproduce the error anymore in this sample app...

(update the proxy reference and use the identity manager to login with the credentials user1/user1)

hopefully, after you confirm that the same works on your end you can work backwards to see whether its your featureLayer or your print service.
0 Kudos
DonCaviness
New Contributor III
I think I should clarify my problem.  I'm not trying to do a selection on a featurelayer.  I'm trying to use a print service that contains multiple secure services.  Here is the post I started http://forums.arcgis.com/threads/80495-Print-Secure-Services-using-10.1-Print-Service.  The error that I get is easily reproduce using the sample OOTB sample server 6 print service.  Any suggestions? Keep in mind that I have set up the custom print service that was mentioned earlier.
0 Kudos
JohnGravois
Frequent Contributor
not sure why you responded to this thread then, but ok....

you can use the same sample app to test sending a print request without making a selection on the layer.
0 Kudos