AnsweredAssumed Answered

Directions Widget .NET Proxy setup problem

Question asked by LuciH on Mar 17, 2014
Latest reply on Mar 17, 2014 by NSager-esristaff
Hello,

I have been attempting to get the javascript 3.8 api Directions Widget to use .NET proxy for logging in to our "Paid" subscription and have not had any luck.  The example at:   https://developers.arcgis.com/javascript/jssamples/widget_directions_basic.html talks about
This sample uses a helper method, added at v3.4, that defines a proxy for a set of resources. In this example all requests to route.arcgis.com are routed to the specified proxy url.

esri.addProxyRule({   urlPrefix: "route.arcgis.com",   proxyUrl: "/sproxy" });


For demonstration purposes this sample uses a proxy that has been setup to use app logins and OAuth2  so you aren't required to log-in with an ArcGIS Online organizational subscription to run the sample.


So, I know that someone somewhere must have been able to get this to work.  Anyone know how they are doing it?  I have tried everything....  My current Proxy was downloaded from GitHub with a date of 3/17/2014.  My current proxy.config file looks like 
<?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*"
             mustMatch="false">
    <serverUrls>
<serverUrl url="http://gis.fwb.org/"
   matchAll="true"/>
    <serverUrl url="http://route.arcgis.com"
  clientId="pertinent ID is here"
  clientSecret="pertinent Secret is here"
  oauth2Endpoint="https://www.arcgis.com/sharing/oauth2/token"
  rateLimit=600
  rateLimitPeriod=600
  matchAll="true">
</serverUrl>
<serverUrl url="http://services.arcgisonline.com"
                 clientId="pertinent ID is here"
  clientSecret="pertinent Secret is here"
  oauth2Endpoint="https://www.arcgis.com/sharing/oauth2/token"
  rateLimit=600
  rateLimitPeriod=600
  matchAll="true"/>
    </serverUrls>
</ProxyConfig>


When I open my web page, the Sign In dialog appears for the Directions Widget.  If I cancel the Sign In and let the web page finish loading, then attempt to get Route Directions, I am given a 500 Internal Server Error  with a message '600' unexpected token. 

Any and all help will be greatly appreciated. 

Thanks,

Luci

Outcomes