<?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 Error printing webmap with print dijit that contains services from different hosts in ArcGIS Server with JavaScript API Questions</title>
    <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/error-printing-webmap-with-print-dijit-that/m-p/854500#M578</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The error:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;{"error":{"code":400,"message":"Unable to complete operation.","details":["Error executing tool. Export Web Map Job ID: j56ff7247723a48e89f247ed4dfbb5d70"]}}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The scenario:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Local on-premise Portal for ArcGIS with federated ArcGIS Server&lt;/LI&gt;&lt;LI&gt;Webmap which contains secured and shared on-premise map service and a remote secured map service. The remote map service is from ArcGIS Server that is&amp;nbsp;&lt;SPAN style="text-decoration: underline;"&gt;not&lt;/SPAN&gt; federated with their Portal for ArcGIS&lt;/LI&gt;&lt;LI&gt;The local on-premise print geoprocessing service uses the same security as the local map service&lt;/LI&gt;&lt;LI&gt;A resource proxy is used for both services - on-premise and remote.&lt;/LI&gt;&lt;LI&gt;The local map service uses OAuth2 available via the proxy:&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;serverUrl matchAll="true" url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmy.webadaptor.com%2Fportal%2F" rel="nofollow" target="_blank"&gt;https://my.webadaptor.com/portal/&lt;/A&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;BR /&gt; clientSecret="0dc210d467eat2me9e1a628767cec48b" &lt;BR /&gt; clientId="MetY25mamaH20GSm"&lt;BR /&gt;&lt;SPAN&gt; oauth2Endpoint="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmy.webadaptor.com%2Fportal%2Fsharing%2Foauth2%2F" rel="nofollow" target="_blank"&gt;https://my.webadaptor.com/portal/sharing/oauth2/&lt;/A&gt;&lt;SPAN&gt;"/&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;The remote map service uses token authentication&amp;nbsp;&lt;SPAN&gt;available via the proxy:&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;serverUrl matchAll="true" url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgis.remoteserver.com" rel="nofollow" target="_blank"&gt;https://their.remoteserver.com&lt;/A&gt;&lt;SPAN&gt;" username="TheirUsername" password="TheirPassword!"/&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;The JSAPI code adds the proxy rules via&amp;nbsp;esri/urlUtils:&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;urlUtils.addProxyRule({&lt;BR /&gt; urlPrefix: "&lt;SPAN style="background-color: #f6f6f6;"&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgis" rel="nofollow" target="_blank"&gt;https://&lt;/A&gt;their.&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;remoteserver&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;.com&lt;/SPAN&gt;/",&lt;BR /&gt; proxyUrl: "&lt;SPAN style="background-color: #f6f6f6;"&gt;my&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;webadaptor.com&lt;/SPAN&gt;/dotnetproxy/proxy.ashx"&lt;BR /&gt; });&lt;BR /&gt; urlUtils.addProxyRule({&lt;BR /&gt;&lt;SPAN&gt; urlPrefix: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmy.webadaptor.com%2F" rel="nofollow" target="_blank"&gt;https://my.webadaptor.com/&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;proxyUrl: "&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;my&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;webadaptor.com&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;/dotnetproxy/proxy.ashx"&lt;/SPAN&gt;&lt;BR /&gt; });&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;The URL via the proxy returns with the response above:&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;A class="link-titled" href="https://my.webadaptor.com/dotnetproxy/proxy.ashx?https://my.webadaptor.com/arcgis/rest/services/Project/ExportWebMap/GPServer/Export%20Web%20Map/execute?f=json&amp;amp;YaddaYaddaYadda" title="https://my.webadaptor.com/dotnetproxy/proxy.ashx?https://my.webadaptor.com/arcgis/rest/services/Project/ExportWebMap/GPServer/Export%20Web%20Map/execute?f=json&amp;amp;YaddaYaddaYadda"&gt;https://my.webadaptor.com/dotnetproxy/proxy.ashx?https://my.webadaptor.com/arcgis/rest/services/Project/ExportWebMap/GPS…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;When I connect to the respective REST catalogs I can successfully export with map services to graphic output.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The webmap is created using the usual arcgisUtils.createMap method. The print dijit is created using the method shown in the sample:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jssamples/widget_print_webmap.html" title="https://developers.arcgis.com/javascript/3/jssamples/widget_print_webmap.html"&gt;Print webmap | ArcGIS API for JavaScript 3.18&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;In fact, if I modify the code in the sandbox to consume my webmap and use my proxy, it successfully generatesthe print if I use the Esri-host print geopocessing service. If I use my locally-hosted print geoprocessing service, the print fails with the same error shown at the top.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the question is, why can I not do this from my on-premise AGS + Portal?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Dec 2016 21:59:26 GMT</pubDate>
    <dc:creator>DirkVandervoort</dc:creator>
    <dc:date>2016-12-13T21:59:26Z</dc:date>
    <item>
      <title>Error printing webmap with print dijit that contains services from different hosts</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/error-printing-webmap-with-print-dijit-that/m-p/854500#M578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The error:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;{"error":{"code":400,"message":"Unable to complete operation.","details":["Error executing tool. Export Web Map Job ID: j56ff7247723a48e89f247ed4dfbb5d70"]}}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The scenario:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Local on-premise Portal for ArcGIS with federated ArcGIS Server&lt;/LI&gt;&lt;LI&gt;Webmap which contains secured and shared on-premise map service and a remote secured map service. The remote map service is from ArcGIS Server that is&amp;nbsp;&lt;SPAN style="text-decoration: underline;"&gt;not&lt;/SPAN&gt; federated with their Portal for ArcGIS&lt;/LI&gt;&lt;LI&gt;The local on-premise print geoprocessing service uses the same security as the local map service&lt;/LI&gt;&lt;LI&gt;A resource proxy is used for both services - on-premise and remote.&lt;/LI&gt;&lt;LI&gt;The local map service uses OAuth2 available via the proxy:&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;serverUrl matchAll="true" url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmy.webadaptor.com%2Fportal%2F" rel="nofollow" target="_blank"&gt;https://my.webadaptor.com/portal/&lt;/A&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;BR /&gt; clientSecret="0dc210d467eat2me9e1a628767cec48b" &lt;BR /&gt; clientId="MetY25mamaH20GSm"&lt;BR /&gt;&lt;SPAN&gt; oauth2Endpoint="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmy.webadaptor.com%2Fportal%2Fsharing%2Foauth2%2F" rel="nofollow" target="_blank"&gt;https://my.webadaptor.com/portal/sharing/oauth2/&lt;/A&gt;&lt;SPAN&gt;"/&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;The remote map service uses token authentication&amp;nbsp;&lt;SPAN&gt;available via the proxy:&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;serverUrl matchAll="true" url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgis.remoteserver.com" rel="nofollow" target="_blank"&gt;https://their.remoteserver.com&lt;/A&gt;&lt;SPAN&gt;" username="TheirUsername" password="TheirPassword!"/&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;The JSAPI code adds the proxy rules via&amp;nbsp;esri/urlUtils:&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;urlUtils.addProxyRule({&lt;BR /&gt; urlPrefix: "&lt;SPAN style="background-color: #f6f6f6;"&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgis" rel="nofollow" target="_blank"&gt;https://&lt;/A&gt;their.&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;remoteserver&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;.com&lt;/SPAN&gt;/",&lt;BR /&gt; proxyUrl: "&lt;SPAN style="background-color: #f6f6f6;"&gt;my&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;webadaptor.com&lt;/SPAN&gt;/dotnetproxy/proxy.ashx"&lt;BR /&gt; });&lt;BR /&gt; urlUtils.addProxyRule({&lt;BR /&gt;&lt;SPAN&gt; urlPrefix: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmy.webadaptor.com%2F" rel="nofollow" target="_blank"&gt;https://my.webadaptor.com/&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;proxyUrl: "&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;my&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;webadaptor.com&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;/dotnetproxy/proxy.ashx"&lt;/SPAN&gt;&lt;BR /&gt; });&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;The URL via the proxy returns with the response above:&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;A class="link-titled" href="https://my.webadaptor.com/dotnetproxy/proxy.ashx?https://my.webadaptor.com/arcgis/rest/services/Project/ExportWebMap/GPServer/Export%20Web%20Map/execute?f=json&amp;amp;YaddaYaddaYadda" title="https://my.webadaptor.com/dotnetproxy/proxy.ashx?https://my.webadaptor.com/arcgis/rest/services/Project/ExportWebMap/GPServer/Export%20Web%20Map/execute?f=json&amp;amp;YaddaYaddaYadda"&gt;https://my.webadaptor.com/dotnetproxy/proxy.ashx?https://my.webadaptor.com/arcgis/rest/services/Project/ExportWebMap/GPS…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;When I connect to the respective REST catalogs I can successfully export with map services to graphic output.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The webmap is created using the usual arcgisUtils.createMap method. The print dijit is created using the method shown in the sample:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jssamples/widget_print_webmap.html" title="https://developers.arcgis.com/javascript/3/jssamples/widget_print_webmap.html"&gt;Print webmap | ArcGIS API for JavaScript 3.18&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;In fact, if I modify the code in the sandbox to consume my webmap and use my proxy, it successfully generatesthe print if I use the Esri-host print geopocessing service. If I use my locally-hosted print geoprocessing service, the print fails with the same error shown at the top.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the question is, why can I not do this from my on-premise AGS + Portal?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 21:59:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/error-printing-webmap-with-print-dijit-that/m-p/854500#M578</guid>
      <dc:creator>DirkVandervoort</dc:creator>
      <dc:date>2016-12-13T21:59:26Z</dc:date>
    </item>
  </channel>
</rss>

