POST
|
No worries. It might be worth adding to the sample both the http and https calls to arcgis.com (or have them in there with some comments). Either way all my issues seem to be sorted. D glad to hear it Daniel. thanks for taking the time to recap.
... View more
06-09-2014
12:52 AM
|
0
|
0
|
100
|
POST
|
Man alive that drove me mad but I have finally got it sorted. The issues. 1. My network proxy so I bypass this altogether as even authenticating with it causes problems (or at least caused me problems). 2. The fact some requests are generated as http and some as https (not sure why that is). So my proxy config looks like this
<serverUrl url="https://services2.arcgis.com/gGQziFjRK38YOiW5/arcgis/rest/services"
username="UserName"
password="Password"
rateLimit="600"
rateLimitPeriod="60"
matchAll="true">
</serverUrl>
<serverUrl url="https://www.arcgis.com"
username="UserName"
password="Password"
rateLimit="600"
rateLimitPeriod="60"
matchAll="true">
</serverUrl>
<serverUrl url="http://www.arcgis.com"
username="UserName"
password="Password"
rateLimit="600"
rateLimitPeriod="60"
matchAll="true">
</serverUrl>
However I can still reference the 3.9 api using either http or https. D
... View more
06-06-2014
05:13 AM
|
1
|
0
|
515
|
POST
|
Ok finally made some progress as can now bypass my network proxy. If I set my proxy config to https://www.arcgis.com Then I get the following error which I am guessing means the proxy is not generating the token as it can't match the request to the proxy config? {"error":{"code":403,"messageCode":"GWM_0003","message":"You do not have permissions to access this resource or perform this operation.","details":[]}} If I set my proxy config to http://www.arcgis.com then I get the error that the request is not made over SSL. Everything is set to ssl apart from localhost.
<link rel="stylesheet" href="https://js.arcgis.com/3.9/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="https://js.arcgis.com/3.9/js/esri/css/esri.css">
<script src="https://js.arcgis.com/3.9/"></script>
D
... View more
06-06-2014
04:41 AM
|
0
|
0
|
515
|
POST
|
Hi John Fiddler did indeed yield some interesting results. 1. It seems my network proxy is blocking some requests which is strange as I have added authenitication details and some requests do succeed. Not sure why this is but I will bypass the network proxy all together. This is going to take a few days as the my circuit for internet traffic not routed via the proxy is down and 3 days in and the ISP has no answers. 2. Some of the json returned is request not made over ssl. Not entirely sure how to resolve this? Last question is when I have the map with layers that run on services2 then do I need an extra config section in proxy.config or will the one below do for this
<serverUrl url="http://www.arcgis.com"
username="AAA"
password="XXX"
rateLimit="600"
rateLimitPeriod="60"
matchAll="true">
</serverUrl>
Either way I am going to wait until my network proxy issue are sorted so I can bypass it all together to eliminate any issues here. Thanks again for all your help as it has been invaluable, D
... View more
06-06-2014
01:52 AM
|
0
|
0
|
515
|
POST
|
I know the guys (a different department from IT) did pay for something although not sure what exactly. Basically this is a prove of concept app to integrate the map/s into a BI app. Ok I am going bin the appid and secret completely and focus on what you have suggested. I have your proxy class part of my vs project so debugging I can see the requests are going via the proxy class. I did make one change to the proxy class to authenticate with our proxy although I can't see why this would have an impact. req.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials; Currently got to do this as I have an issue with traffic not going via our proxy but once sorted I will bypass our network proxy completely. Ta, D
... View more
06-05-2014
09:27 AM
|
0
|
0
|
515
|
POST
|
I have 2 private webmaps (one with layers and one without layers). If I call the one without layers then this will load without a challenge provided I supply an AppID and a Secret. If I do not provide these in the proxy config then it will challenge even if I provide a username and password. On the 2nd map which has layers which come from (https://service2.....) then it does not matter what I supply it will challenge every single time. Not too sure how to log a ticket as only started working with the API a few days ago. That is basically it, D
... View more
06-05-2014
09:06 AM
|
0
|
0
|
515
|
POST
|
Oh jaysus my apologies John -- I just assumed you were a fellow user. Ok so first question do I even need the application to be setup in ArcGIS online? Second if I can authenticate using username and password then why would my basic map with no layers not work when using username and password? Ta, D thats fine. you can tell them you'd like to work with me specifically if you want 🙂 appId/appSecret should not be thought of as a way to authenticate and access shared content. those credentials are specifically intended to allow an application to access subscription services which burn credits without requiring someone to sign in, or provide information to identify an app which uses an OAuth2 technique to have people sign in with their own credentials to work with private content.
... View more
06-05-2014
08:40 AM
|
0
|
0
|
515
|
POST
|
Further to this the basic map with no layers does not challenge if a username and password are not supplied. It simply wants the app and secret and then no challenge. As for the one with layers there is nothing I can do to stop it challenging. I think my only option is going to be to contact Esri support. Thanks, D
... View more
06-05-2014
08:13 AM
|
0
|
0
|
584
|
POST
|
The service is only shared with our org. If I remove appid and secret then even the basic map with no layers challenges.
... View more
06-05-2014
08:05 AM
|
0
|
0
|
584
|
POST
|
Everything runs over https except the app itself which is http. When I change the following in the proxy config to https then even the basic map with no layers will start challenging (works otherwise).
<serverUrl url="http://www.arcgis.com"
clientId="ID"
clientSecret="SECRET"
username="USER"
password="PW"
rateLimit="600"
rateLimitPeriod="60"
matchAll="true">
</serverUrl>
No matter what I do the layers which run on https://services2.arcgis cause a challenge. I even have the following section in the proxy which make naff all difference.
<serverUrl url="https://services2.arcgis.com/gGQziFjRK38YOiW5/arcgis/rest/services"
clientId="ID"
clientSecret="SECRET"
username="USER"
password="PW"
rateLimit="600"
rateLimitPeriod="60"
matchAll="false">
</serverUrl>
I can't see anywhere where I can tell it to run the layers over http. Ta, D
... View more
06-05-2014
07:55 AM
|
0
|
0
|
584
|
POST
|
Hi John Yeah I know about that setting but that is not the problem as the maps and layers are all shared. I can view the maps normally through the WebUI (or if I authenticate when the challenge comes). I was just wondering if there was another setting for permissions when accessing the REST services via the API. Basically the proxy works as it authenticates with http://www.arcgis.com where the map lives so I can bring up the map with no challenge. However if the map contains layers that live here https://services2.arcgis.com then I will get challenged. If I authenticate manually when challenged then the maps loads without a problem. I have made sure all traffic is routed via the proxy by setting
esriConfig.defaults.io.proxyUrl = "http://localhost:54254/proxy/proxy.ashx";
esriConfig.defaults.io.alwaysUseProxy = true;
I have also tried multiple combinations of the address in the proxy.config 1. https://services2.arcgis.com 2. https://www.services2.arcgis.com But nothing seems to make a difference. Ta, D you can set permissions on individual items (that you own) in ArcGIS Online by navigating to their item details page and clicking "share" [ATTACH=CONFIG]34341[/ATTACH] http://esrihack.maps.arcgis.com/home/item.html?id=a3e05a39087c4a768d43ae231ea158e0
... View more
06-05-2014
12:17 AM
|
0
|
0
|
584
|
POST
|
Seems the thread order is not right. Again I do not think the proxy is at fault given trying to access them directly from the browser ends in error. https://services2.arcgis.com/"ID"/arcgis/rest/services/"NAME"/FeatureServer/3?f=json&token=MYTOKEN returns an error {"error":{"code":403,"message":"You do not have permissions to access this resource or perform this operation.","messageCode":"GWM_0003","details":["You do not have permissions to access this resource or perform this operation."]}} As I said in the original post I have only been working with this for a few days so probably missing quite a bit. Situation is basically that the proxy works for maps living here http://www.arcgis.com however if they contain layers living here https://services2.arcgis.com then it will challenge. Once again thanks for taking the time to respond, D are your own REST services public or do they require authentication? if so, are you including the credentials for that specific resource in the proxy.config? if you try to use the proxy directly in the browser to access the REST endpoint is it successful? ie: http://yourmachine/folder/proxy.ashx?http://services2.arcgis.com/arcgis/blah....
... View more
06-04-2014
08:48 AM
|
0
|
0
|
584
|
POST
|
Manually constructing the url and token against this resource and I think it is still a permission problem on the layers. https://services2.arcgis.com/"ID"/arcgis/rest/services/"NAME"/FeatureServer/3?f=json&token=MYTOKEN returns an error {"error":{"code":403,"message":"You do not have permissions to access this resource or perform this operation.","messageCode":"GWM_0003","details":["You do not have permissions to access this resource or perform this operation."]}} I am fed up with this thing now as I do not see anywhere I am supposed to set these permissions on the layers. D Yeah thanks although not quite fine yet as still getting the challenges caused by the layers. At the mo i have routed everything through the proxy and added the config for the https://services2 address but no joy.
... View more
06-04-2014
08:27 AM
|
0
|
0
|
584
|
POST
|
Yeah thanks although not quite fine yet as still getting the challenges caused by the layers. At the mo i have routed everything through the proxy and added the config for the https://services2 address but no joy. glad to hear i was able to help sort you out. you'll want to use either http or https across the board for resources and your actual application to avoid mixed protocol errors thrown by the browser.
... View more
06-04-2014
08:17 AM
|
0
|
0
|
680
|
POST
|
Ok I have got to the bottom of it and the proxy is working. I created a new map with no layers and everything is fine. The existing map has layers coming from https://services2.arcgis.com & https://services.arcgisonline.com So I would say the challenges are coming from here. D I have just manually generated the token and manually constructed map call and I get the same error so I am it does not look like the proxy is causing the problem. Could it be layers on the map?
... View more
06-04-2014
05:52 AM
|
0
|
0
|
680
|
Title | Kudos | Posted |
---|---|---|
1 | 06-06-2014 05:13 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|