Does AGOL and the Directions Widget not support embedded credentials for a routing service called from an on premise web server? If I add the AGOL routing url to MyContent and choose to store the credentials, and then use that URL in the directions widget is works if I access the app from our organization's URL but not from arcgis.com or from our own corporate web server. In those cases I still get the prompt for credentials. Use case is a public site using this widget, and application hosted on own web server Thanks for any thoughts.
Sam
Solved! Go to Solution.
Sam,
For your use case example the use of a proxy that stores the credentials is required.
Sam,
For your use case example the use of a proxy that stores the credentials is required.
Thanks Robert, I'm on it. It seems as though you have to use "alwaysUseProxy=true" to get it to fire correctly which is not ideal as all requests now go through that server side code, but at least the prompt is avoided. Appreciate that.
Sam
Sam,
The use of alwaysUseProxy=true is definitely not required. You just need to add a rule to your config.json
i.e.
"httpProxy": {
"useProxy": true,
"alwaysUseProxy": false,
"url": "/DotNet/proxy.ashx",
"rules": [
{ "urlPrefix": "http://route.arcgis.com/", "proxyUrl": "/DotNet/proxy.ashx" },
{ "urlPrefix": "http://traffic.arcgis.com/", "proxyUrl": "/DotNet/proxy.ashx" }
]
}
Awesome, thanks. You know, I had these in the proxy.config but moving them up into the config.json of the app for the proxy did the trick. Thanks again.
"rules": [
"urlPrefix": "http://route.arcgis.com/",
"proxyUrl": "proxy/proxy.ashx"
"urlPrefix": "http://traffic.arcgis.com/",
"proxyUrl": "proxy/proxy.ashx"
"urlPrefix": "http://utility.arcgis.com/",
"proxyUrl": "proxy/proxy.ashx"
"urlPrefix": "http://logistics.arcgis.com/",
"proxyUrl": "proxy/proxy.ashx"