AnsweredAssumed Answered

Print Dijit Woes

Question asked by mflawton on Sep 25, 2013
Latest reply on Sep 25, 2013 by JGravois-esristaff
I've searched the forums for a problem similar to mine, but haven't been able to find an applicable thread. I have a fairly complex JavaScript API application I have been developing since version 1.4. I am currently on JSAPI version 3.4 and am running my services on ArcGIS Server 10.1. I am finally getting around to setting up the Print dijit in my app, but keep running into errors. Since the latest 3.6 documentation uses the AMD referencing method, I have found it difficult to find examples that make sense in my application, but here is what I have basically added to my code to get a print button on my app:

  esri.config.defaults.io.proxyUrl = "http://" + hostName + "/proxy/proxy.ashx";   var printer = new esri.dijit.Print({     map: map,     url: "http://" + hostName + "/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"   }, dojo.dom.byId("printButton"));   printer.startup();


I also added the necessary Require statements for the Print dijit and the Dojo DOM. I set up the proxy code per the ASP.NET download and instructions. I have added a "printButton" DIV to my HTML. The application loads fine, no errors, and the print button is visible. However, when I click on the print button I get a few seconds of wait time and then the following error in Chrome:

Error {code: 400, message: "Unable to complete operation.", details: Array[1], log: undefined}  init.js:15 _49d init.js:15 (anonymous function) init.js:15 _1e1 init.js:15 _1df init.js:15 resolve.callback init.js:15 _1e1 init.js:15 _1df init.js:15 resolve.callback init.js:15 _1e1 init.js:15 _1df init.js:15 resolve.callback init.js:15 _1e1 init.js:15 _1df init.js:15 resolve.callback init.js:15 (anonymous function) init.js:15 _4c2 init.js:15 _4bc init.js:15 resolve init.js:15 _4c8 init.js:15 _4c2 init.js:15 _4bc init.js:15 resolve init.js:15 _4c8 init.js:15 _4c2 init.js:15 _4bc init.js:15 resolve init.js:15 _4c8 init.js:15 _4c2 init.js:15 _4bc init.js:15 resolve init.js:15 _3e6 init.js:15 _3f2


My "Export Web Map Task" is running on my local ArcGIS Server 10.1 deployment. I also tried referencing the ESRI hosted task, but I get the same error. The button seems like it is trying to do something, but I just don't get the response, instead just the error. I'm pretty lost here. Am I missing a parameter? Am I not initializing the tool properly in my code? Is my proxy not configured correctly (how would I test that)? Is it an issue with the Export service?

Any help and direction would be greatly appreciated.

Outcomes