Hi,
I am trying to access the route service ,but while doing so I get the following error.
code":499,"message":"Token Required"
The localhost is being generated from Visual studio once I configured the Javascript SDK frok ESRI.
At the same time I just downloaded the routing example and with Dotnet proxy file I have hosted through IIS.
The routing is working for me.
Any possible reason why its behaving like this?
Below is the proxy used in IIS
<?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*"
mustMatch="true">
<serverUrls>
<serverUrl url="http://services.arcgisonline.com"
matchAll="true"/>
<serverUrl url="https://route.arcgis.com"
username="xyz"
password="xyz"
matchAll="true"/>
</serverUrls>
</ProxyConfig>
and the proxy used in Visual studio.
<?xml version="1.0" encoding="utf-8" ?>
<!-- Proxy config is used to set the ArcGIS Server services that the proxy will forward to.
mustMatch: true to only proxy to sites listed, false to proxy to any site -->
<ProxyConfig mustMatch="false">
<serverItems>
<!-- serverUrl options:
url = location of the ArcGIS Server, either specific URL or stem
matchAll = true to forward any request beginning with the url
token = (optional) token to include for token secured services, usually a long-term token
tokenUrl = (optional) token service for a Web site (url)
timeout = (optional) short-term timeout for a token in minutes
username = (optional) username for a token or http secured site
password = (optional) password for a token or http secured site
domain = (optional) domain for an http secured site
-->
<serverItem url="http://sampleserver1.arcgisonline.com/arcgis/rest/services"
matchAll="true" />
<serverItem url="http://sampleserver2.esri.com/arcgis/rest/services/"
matchAll="true" />
<serverItem url="http://server.arcgisonline.com/arcgis/rest/services"
matchAll="true" />
<serverItem url="http://xyz/xyz/rest/services"
matchAll="true" tokenUrl="http://xyz/axxxxxx/tokens"
username="xyz" password="xyz"
timeout="5" />
<serverItem url="http://xyz/ArcGIS/rest/services"
matchAll="true" domain="xyz" username="xyz" password="xyz" />
<serverItem url="http://geocode.arcgis.com" username="xyz" password="xyz" matchAll ="true"/>
<serverItem url="https://route.arcgis.com"
username="xyz"
password="xyz"
matchAll="true"/>
</serverItems>
</ProxyConfig>
Thanks
Kumar