<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Print Task For Public IP in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-task-for-public-ip/m-p/388718#M35869</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have two arcgis server.one is installed on my local machine.Other is on our production server.&lt;/P&gt;&lt;P&gt;Below is my code for print button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;esriConfig.defaults.io.corsDetection = false;&lt;BR /&gt; esriConfig.defaults.io.alwaysUseProxy = false; &lt;BR /&gt;&lt;SPAN&gt; esriConfig.defaults.io.proxyUrl = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2FmachineName%2FProxy%2Fproxy.ashx" rel="nofollow" target="_blank"&gt;http://machineName/Proxy/proxy.ashx&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var url ='&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2FMachineNAme%2Farcgis%2Frest%2Fservices%2FUtilities%2FPrintingTools%2FGPServer%2FExport%2520Web%2520Map%2520Task%27%3B" rel="nofollow" target="_blank"&gt;http://MachineNAme/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task';&lt;/A&gt;&lt;BR /&gt; var printTask = new PrintTask(url);&lt;BR /&gt; var template = new PrintTemplate();&lt;BR /&gt; template.exportOptions = {width:1000,height:400,dpi: 96};&lt;BR /&gt; template.layoutOptions = {&lt;BR /&gt; titleText: "Mosques",&lt;BR /&gt; scalebarUnit: "Miles",&lt;BR /&gt; authorText: "Made by: Esri's JS API Team",&lt;BR /&gt; copyrightText: "&amp;lt;copyright info here&amp;gt;",&lt;BR /&gt; legendLayers: [], &lt;BR /&gt; };&lt;BR /&gt; template.format = "PDF";&lt;BR /&gt; template.layout = "A3 Landscape";//"A3 Portrait";//"MAP_ONLY";&lt;BR /&gt; template.preserveScale = true;&lt;BR /&gt; template.showLabels=false;&lt;BR /&gt; &lt;BR /&gt; var params = new PrintParameters();&lt;BR /&gt; params.map = map;&lt;BR /&gt; params.template = template;&lt;BR /&gt; //printTask.execute(params, printResult);&lt;BR /&gt; printTask.execute(params).then(printResult, printError);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function printResult(result) {&lt;BR /&gt; window.open(result.url, "_blank")&lt;BR /&gt; }&lt;BR /&gt; function printError(error) {&lt;BR /&gt; alert(error);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i use localhost instead of machine name in printtask.it works properly.even in proxy i use domain url of production server.But when i use print task url of production server it throws me error.that is given below.&lt;/P&gt;&lt;P&gt;Error: Unable to complete operation.&lt;BR /&gt; at Object.g.load (js.arcgis.com/3.20/init.js:984)&lt;BR /&gt; at js.arcgis.com/3.20/init.js:87&lt;BR /&gt; at c (js.arcgis.com/3.20/init.js:103)&lt;BR /&gt; at d (js.arcgis.com/3.20/init.js:103)&lt;BR /&gt; at a.Deferred.resolve.callback (js.arcgis.com/3.20/init.js:105)&lt;BR /&gt; at c (js.arcgis.com/3.20/init.js:104)&lt;BR /&gt; at d (js.arcgis.com/3.20/init.js:103)&lt;BR /&gt; at a.Deferred.resolve.callback (js.arcgis.com/3.20/init.js:105)&lt;BR /&gt; at js.arcgis.com/3.20/init.js:92&lt;BR /&gt; at n (js.arcgis.com/3.20/init.js:107)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i could not understand.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://MachineName/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task.when"&gt;http://MachineName/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://MachineName/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task.when"&gt;when&lt;/A&gt;&amp;nbsp;i press this link.it give me the attached file page.it means network works properly.so why not response came.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or y not my print work for public ip.My arcgis server is on domain network.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Apr 2017 09:00:03 GMT</pubDate>
    <dc:creator>NadirHussain</dc:creator>
    <dc:date>2017-04-26T09:00:03Z</dc:date>
    <item>
      <title>Print Task For Public IP</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-task-for-public-ip/m-p/388718#M35869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have two arcgis server.one is installed on my local machine.Other is on our production server.&lt;/P&gt;&lt;P&gt;Below is my code for print button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;esriConfig.defaults.io.corsDetection = false;&lt;BR /&gt; esriConfig.defaults.io.alwaysUseProxy = false; &lt;BR /&gt;&lt;SPAN&gt; esriConfig.defaults.io.proxyUrl = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2FmachineName%2FProxy%2Fproxy.ashx" rel="nofollow" target="_blank"&gt;http://machineName/Proxy/proxy.ashx&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var url ='&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2FMachineNAme%2Farcgis%2Frest%2Fservices%2FUtilities%2FPrintingTools%2FGPServer%2FExport%2520Web%2520Map%2520Task%27%3B" rel="nofollow" target="_blank"&gt;http://MachineNAme/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task';&lt;/A&gt;&lt;BR /&gt; var printTask = new PrintTask(url);&lt;BR /&gt; var template = new PrintTemplate();&lt;BR /&gt; template.exportOptions = {width:1000,height:400,dpi: 96};&lt;BR /&gt; template.layoutOptions = {&lt;BR /&gt; titleText: "Mosques",&lt;BR /&gt; scalebarUnit: "Miles",&lt;BR /&gt; authorText: "Made by: Esri's JS API Team",&lt;BR /&gt; copyrightText: "&amp;lt;copyright info here&amp;gt;",&lt;BR /&gt; legendLayers: [], &lt;BR /&gt; };&lt;BR /&gt; template.format = "PDF";&lt;BR /&gt; template.layout = "A3 Landscape";//"A3 Portrait";//"MAP_ONLY";&lt;BR /&gt; template.preserveScale = true;&lt;BR /&gt; template.showLabels=false;&lt;BR /&gt; &lt;BR /&gt; var params = new PrintParameters();&lt;BR /&gt; params.map = map;&lt;BR /&gt; params.template = template;&lt;BR /&gt; //printTask.execute(params, printResult);&lt;BR /&gt; printTask.execute(params).then(printResult, printError);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function printResult(result) {&lt;BR /&gt; window.open(result.url, "_blank")&lt;BR /&gt; }&lt;BR /&gt; function printError(error) {&lt;BR /&gt; alert(error);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i use localhost instead of machine name in printtask.it works properly.even in proxy i use domain url of production server.But when i use print task url of production server it throws me error.that is given below.&lt;/P&gt;&lt;P&gt;Error: Unable to complete operation.&lt;BR /&gt; at Object.g.load (js.arcgis.com/3.20/init.js:984)&lt;BR /&gt; at js.arcgis.com/3.20/init.js:87&lt;BR /&gt; at c (js.arcgis.com/3.20/init.js:103)&lt;BR /&gt; at d (js.arcgis.com/3.20/init.js:103)&lt;BR /&gt; at a.Deferred.resolve.callback (js.arcgis.com/3.20/init.js:105)&lt;BR /&gt; at c (js.arcgis.com/3.20/init.js:104)&lt;BR /&gt; at d (js.arcgis.com/3.20/init.js:103)&lt;BR /&gt; at a.Deferred.resolve.callback (js.arcgis.com/3.20/init.js:105)&lt;BR /&gt; at js.arcgis.com/3.20/init.js:92&lt;BR /&gt; at n (js.arcgis.com/3.20/init.js:107)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i could not understand.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://MachineName/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task.when"&gt;http://MachineName/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://MachineName/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task.when"&gt;when&lt;/A&gt;&amp;nbsp;i press this link.it give me the attached file page.it means network works properly.so why not response came.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or y not my print work for public ip.My arcgis server is on domain network.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Apr 2017 09:00:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-task-for-public-ip/m-p/388718#M35869</guid>
      <dc:creator>NadirHussain</dc:creator>
      <dc:date>2017-04-26T09:00:03Z</dc:date>
    </item>
  </channel>
</rss>

