Esri/resource-proxy

Getting Invalid token error when trying to access ArcGIS World Geocoding Service on non-public Web Map

Closed this issue · 2 comments

Created Web AppBuilder application with Screening and Search widgets who use Geocoder URL: https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer
WAB application hosted on IIS. Application Web Map secured (non-public). IIS and ArcGIS Portal are on different machines.

Screening and Search widgets do not work on the WAB application hosted on IIS.
Invalid token error 498 received:
https://<IIS_machine>/DotNet/proxy.ashx?https://<Portal_machine>/portal/sharing/rest/portals/self?token=eZEUhPFBh3K_ZJNp9PojslFuR_vuBeKJYPqgRXPL0de8B7l5id7ls5Gm0cY87RjHq6gqzeM51K4GdXasNaHRNcbegdOLbdowt51zrDvDmQkKG_79nMyxDmMM6TjU0VriHlVdm40JfdSbVW5bbjRevRwdt_VVoK_O8AIwHtRsm5s.?f=json

DotNet proxy.config:

<?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*"
             mustMatch="true" xmlns="proxy.xsd">
    <serverUrls>
		<serverUrl url="https://<Portal_machine>"
				   matchAll="true"/>
    </serverUrls>
</ProxyConfig>

Hosted WAB application config.json proxy parameters:

	"httpProxy": {
		"useProxy": true,
		"url": "https://<IIS_machine>/DotNet/proxy.ashx",
		"alwaysUseProxy": false,
		"rules": [
			{
				"urlPrefix": "https://<Portal_machine>",
				"proxyUrl": "https://<IIS_machine>/DotNet/proxy.ashx"
			}
		]
	}

I already contacted ESRI technical support but this scenario is not further investigated because is not directly WebApp builder related.
Thanks.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you need additional assistance please contact Esri Technical Support. Thank you for your contributions.

This issue has been automatically closed due to inactivity. If you need additional assistance please contact Esri Technical Support.