Select to view content in your preferred language

Proxy Dynamic Token Error - urgent

1010
4
02-09-2011 02:20 AM
AlexanderAnkrah
Deactivated User
Hi Guys,
I have a secure service and using the proxy pages suggested here http://forums.esri.com/Thread.asp?c=158&f=2396&t=297001

All works OK for the unsecured services on the server I'm trying to access But falls apart when I try access the secured services. I'm getting {"error":{"code":400,"message":"","details":["Unauthorized access"]}}

Is there any configuration step I'm missing? This is really daft 'cos it worked well when we last used it for printing...

I've placed these

esri.config.defaults.io.proxyUrl = "proxy.ashx";
esri.config.defaults.io.alwaysUseProxy = true;

in my init ()

and in the proxy I have

<serverUrl url="http://MYSERVER/ArcGIS/rest/services/Secure/MYSERVICE/MapServer"
               matchAll="false"
               dynamicToken="true"
               host="gis.MyCOMPANY.org.YYY" //**had http here but no joy
               userName="someName"
               password="somePassword"></serverUrl>

Anything I'm missing?

Thanks
dON
0 Kudos
4 Replies
PragneshPatel
Deactivated User
Hi Guys,
I have a secure service and using the proxy pages suggested here http://forums.esri.com/Thread.asp?c=158&f=2396&t=297001

All works OK for the unsecured services on the server I'm trying to access But falls apart when I try access the secured services. I'm getting {"error":{"code":400,"message":"","details":["Unauthorized access"]}}

Is there any configuration step I'm missing? This is really daft 'cos it worked well when we last used it for printing...

I've placed these

esri.config.defaults.io.proxyUrl = "proxy.ashx";
esri.config.defaults.io.alwaysUseProxy = true;

in my init ()

and in the proxy I have

<serverUrl url="http://MYSERVER/ArcGIS/rest/services/Secure/MYSERVICE/MapServer"
               matchAll="false"
               dynamicToken="true"
               host="gis.MyCOMPANY.org.YYY" //**had http here but no joy
               userName="someName"
               password="somePassword"></serverUrl>

Anything I'm missing?

Thanks
dON


hi did you managed to solve this problem?
0 Kudos
nicogis
MVP Alum
Pragnesh, have you tried to go in debug on proxy.ashx? so you see problem
0 Kudos
DerivenC
Deactivated User
Can't believe I missed this thread (and instead created a new one).  The issue I found is that cookies are not being sent in version 3.0, meaning your secure cookie isn't being sent -- this the "unauthorized access".

I submitted the error here:
http://forums.arcgis.com/threads/61348-BUG-In-3.0-No-Cookie-Present-in-Proxy-Requests

Workaround is to use version 2.8 for now.
0 Kudos
RoyJackson1
Deactivated User
When I had this problem, it was because I had windows authentication turned on in IIS.  The proxy page did not have permission to run.  I had to change the proxy page to include windows credentials.

onto line 59:

System.Net.WebRequest req = System.Net.WebRequest.Create(new Uri(uri));
  req.Method = context.Request.HttpMethod;
        req.Credentials = new NetworkCredential("USERNAME", "PASSWORD", "DOMAIN");

HTH
0 Kudos