I saw this question asked in a different part of the forums and it was never answered. I am having the same issue.
I am trying to use the print widget to print a secure map (per the below example of a secure map). None of our stuff is on-prem, it's all ESRI cloud.
I am using a proxy from GitHub - GitHub - Esri/resource-proxy and all calls work fine - except the print widget when attempting to export a SECURE map. I have ensured my credentials were working correctly.
{"error":{"code":400,"message":"Unable to complete operation.","details":["Error executing tool. Export Web Map Task : Layer \"2016 USA Population Density\": Unable to connect to map server at https://demographics6.arcgis.com/arcgis/rest/services/USA_Demographics_and_Boundaries_2016/MapServer... to execute (Export Web Map).\nFailed to execute (Export Web Map Task)."]}}
Thanks in advance,
T
Travis,
Do you have anything set-up for allowedReferers or mustMatch?
Hey Travis,
I just tried loading your secured layer to see what would happen... something interesting... I'm not sure it's related, but I got into an infinite redirect loop:
Do you have anything set-up for allowedReferers or mustMatch?
<ProxyConfig allowedReferers="*"
mustMatch="true">
Just double-checking, have you reviewed Print maps that contain secured services—Documentation (10.5) | ArcGIS Enterprise ?
Hi Chris,
Print maps that contain secured services—Documentation (10.5) | ArcGIS Enterprise
It's working for me.
Or you can put token to your Web_Map_as_JSON parameter.
Are you on prem?
This is for on-prem. I am trying to accomplish this through ARCGis cloud services only.
Our webapp calls into the proxy which then calls the print service.
You can try to modify Web_Map_as_JSON parameter, service url to "http://yourhost/proxy/proxy.ashx?service_url".
I'll try to find this in the API and see if this has an affect.