POST
|
I tried your suggestions Kristian, but still got the same issue. I did some further investigation into the SEC7120 issue and I was able to resolve it by adding the entry beow in the proxy Web.config. This initially fixed my issue. Unfortunately I still do not get my layer consistently added. I now get an SEC7123 error (see below). <system.webServer> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> </customHeaders> </httpProtocol> </system.webServer> SEC7123: Request header content-type was not present in the Access-Control-Allow-Headers list.
... View more
03-31-2015
03:51 PM
|
0
|
1
|
1132
|
POST
|
Thanks Kristian, I shall give your suggestions a try.
... View more
03-31-2015
01:48 PM
|
0
|
0
|
1132
|
POST
|
I have very little code dealing with the proxy. Before I create the map (using my own dojo class), I set the esriConfig.defaults.io.proxyUrl. See below. Normally the alwaysUseProxy is set to false. Below I have also included the values from my esriConfig.defaults.io The only reason I started using the proxy was that I started getting inconsistent failures and in the console there was an error complaining that the proxyUrl was null. I assumed this was the result of an attempt e to use the proxy, due to the large query string I was using. I therefore installed the proxy and added the settings below. My issue with the null proxyUrl went away and so did my inconsistent failures. Recently I changed the services I was using to get different data, and I ran into another issue. While investigating I found that my proxy was in fact not being used even when there was a large query string (> 2000). I could see a POST being performed directly to my service. So I am now confused about when the proxy gets used. require(["tps/map", "esri/config", "dojo/domReady!"], function (tpsMap, esriConfig) { // Setup Esri Config esriConfig.defaults.io.proxyUrl = "http://phunt-pc/EsriProxy/proxy.ashx" esriConfig.defaults.io.alwaysUseProxy = true; // Create and display Map tpsMap = new tpsMap(oMapConfiguration); tpsMap.mapQuery = oMapQuery; tpsMap.createMap("divMap"); }); esriConfig.defaults.io {...} [Methods]: {...} [prototype]: {...} alwaysUseProxy: true corsDetection: true corsEnabledServers: [...] corsStatus: {...} maxRequestWorkers: 5 postLength: 2000 proxyRules: [] proxyUrl: "http://phunt-pc/EsriProxy/proxy.ashx" timeout: 60000 useCors: true useWorkers: "on-request" webTierAuthServers: []
... View more
03-31-2015
01:17 PM
|
0
|
4
|
1132
|
POST
|
When I set alwaysUseProxy = true, an attempt is made to use the proxy, in the scenario where it was not previously used. So setting alwaysUseProxy to true would seem to force it. Interestingly the first layer I add is from server.arcgisonline.com. I added the url in the Proxy config (see below), however it fails. Below are the errors I see in the console. I get the same errors when the Proxy is used to access my own service. Proxy.config: <serverUrls> <serverUrl url="http://server.arcgisonline.com/ArcGIS/rest/services" matchAll="true"/> </serverUrls> Errors: SEC7120: Origin http://localhost:3042 not found in Access-Control-Allow-Origin header. SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied. RequestError: Unable to load http://phunt-pc/EsriProxy/proxy.ashx?http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer?f=json status: 0
... View more
03-31-2015
12:34 PM
|
0
|
0
|
1132
|
POST
|
I'm developing a Web Application that is using the ArcGIS Javascript API. When adding a Feature Layer I'm using the setDefinitionExpression to limit the features that are returned. The expression used can be quite large (greater than 2000 in length). Because the expression can be large, I am attempting to use the Proxy page, however I am seeing unusual results. I am finding that the proxy page is not always used, even though I am using the exact same query expression. I have conformed this by utilizing IE's debugger tool and also using Fiddler. In my application if I add 2 layers (Tiled and Dynamic) prior to adding the Feature Layer I consistently see that the Proxy page is not being used. I can see via the debugging tools that a POST is being performed directly to my REST service. The content-length is over 6000. If I add just the Tiled layer prior to adding the Feature Layer, I can see that an attempt is made to use the Proxy page. The proxy page is having issues, therefore my Feature Layer does not get added. Can someone please explain why the Proxy page is not always used even though it would seem that it should be, given the length of the query string used in the setDefinitionExpession. I am very confused as to why layers added prior to adding a Feature Layer would affect the use of the proxy.
... View more
03-31-2015
11:39 AM
|
0
|
8
|
8272
|
POST
|
I've written some code to query a Feature Layer using either a QueryTask or using the setDefinitionExpression when adding the layer. For testing I am using the ASP.Net Development Server. I've noticed (via Fiddler) that when my "where" statement is large, my request automatically changes from a GET to a POST. Occasionally however my request fails with an "esri.config.defaults.io.proxyUrl is not set." error. In researching this error I have found that it may be due to the length of the URL exceeded the maximum length, and that to workaround this issue I should use a proxy, in order to perform a POST. I am however confused by this because I am already seeing my requests change from using a GET to a POST. When performing a query using a large where clause,does the request in fact get changed from a GET to a POST when necessary? If so, is the use of a proxy still necessary in this case.
... View more
03-11-2015
03:13 PM
|
0
|
1
|
3750
|
POST
|
I'm using ArcGIS Javascript API, and I need to query the GIS and show the results on the map. Currently I have used a Query Task by specifying the layer, the "where" statement, graphic symbol, InfoTemplate etc. and it works well. I'm wondering however whether I should be using a Feature Layer with a Definition Expression, rather than the Query Task. Using a Feature Layer would enable the drawing information from the server to be used. Also the symbol would show in the legend. When is it better to use a Query Task rather then a Feature Layer?
... View more
02-11-2015
12:04 PM
|
0
|
1
|
4106
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|