Esri / resource-proxy

Proxy files for DotNet, Java and PHP.
Apache License 2.0
372 stars 321 forks source link

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

Closed gytradzevicius closed 3 years ago

gytradzevicius commented 4 years ago

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:///DotNet/proxy.ashx?https:///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.

github-actions[bot] commented 3 years ago

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.

github-actions[bot] commented 3 years ago

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