<serverUrl url="http://services.arcgisonline.com/ArcGIS/rest/services/" matchAll="true"></serverUrl> <serverUrl url="http://sampleserver1.arcgisonline.com/arcgis/rest/services/" matchAll="true"></serverUrl> <serverUrl url="http://sampleserver2.arcgisonline.com/arcgis/rest/services/" matchAll="true" token=""></serverUrl> <serverUrl url="http://server.arcgisonline.com/arcgis/rest/services/" matchAll="true"></serverUrl> <serverUrl url="http://orthogonal.esri.com/arcgis/rest/services/" matchAll="true"></serverUrl>
I'm getting the same error message when trying to make a request directly from the REST endpoint, so no proxy involved, right? Get the error even when I'm remoted in to the machine where Server resides.Any thoughts appreciated.Mike
One more thing, this is not just for print service. It happens for any types of service, for example geometry service. If you are trying to reproject a geometry through a geometry service, and the domain of the geometry service has not been accessed before, the same situation will happen. It will send a call to rest info to decide if CORS is supported or not, but the first request to the geometry service will go through proxy since it doesn't know the result yet from the rest info call.
I believe my error was due to downloading the proxy from an older help page (which had an older version of the proxy). Once I found the newest version of the proxy and had it set up, it fixed my problem.I just spent a few minutes looking through the new JS API Resources page trying to find the newest version of the proxy for you, but I can't seem to track it down. ESRI really needs to work on getting a search function up and running again!
Are you certain your proxy is working correctly? I had a similar issue when trying to create a print task to a web map; the first time I clicked the Print button I would get an error, but it would work if I clicked it a second time. It turned out my proxy wasn't set up properly; correcting that fixed the problem.
<serverUrl url="http://services.arcgisonline.com/ArcGIS/rest/services/" matchAll="true"></serverUrl>
XMLHttpRequest cannot load http://services.arcgisonline.com/ArcGIS/rest/info?f=json. Origin http://localhost is not allowed by Access-Control-Allow-Origin.
"Error executing tool.: Layer "layer0": Unable to connect to map server at http://services.arcgisonline.com/Arc..._Map/MapServer. Failed to execute (Export Web Map). Failed to execute (Export Web Map Task)."
What happens when you fire the request directly at the REST endpoint? ie.... http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export Web Map Task/execute?Web_Map_as_JSON={"mapOptions":{.... is your application actually using a proxy to make the print request?
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.