CORS Issue with Firefox and Chrome, but not IE.

5739
2
05-06-2015 07:24 AM
BenTreptow1
New Contributor

I have an app that allows a user to create/edit features in a map using the JS API. My feature service is secured. However, I have to use a proxy because the end users require that there be no login to access the app. Everything works fine in IE, but in Chrome and Firefox I get the standard "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at..." message. I also get some ambiguous Object error when I try to add a feature to the map. The odd thing is the feature still gets written back to the feature service despite the error and it failing to display on the map until the page or service is refreshed.

I have CORS enabled on my webservers. My ArcGIS Servers are on an internal domain separate from my webservers that are on a DMZ. My proxy.ashx is working. There's lots of information about this kind of stuff out there, but nothing I try seems to work.

Anyone have a suggestion???

Also, I'm not really sure what information to include here so if more is required please let me know!

Firebug.PNG

    //esriConfig.defaults.io.corsDetection = true;
    //esriConfig.defaults.io.alwaysUseProxy = true;
    //esriConfig.defaults.io.corsEnabledServers.push("gis.logis.org");
    //esriConfig.defaults.io.useCors = false;
    //Send requests to ArcGIS Server through the proxy. This prevents users from having to log in.
    if (cityFolder != null) {
        esriurlUtils.addProxyRule({
            proxyUrl: "https://...",
            urlPrefix: cityFolder
            //urlPrefix: "..."
        });
        //esriConfig.defaults.io.proxyUrl = "...";
    }
0 Kudos
2 Replies
GaryBushek
New Contributor III

Having the same issue. Were you able to resolve this?  I set the response header to enable Cors on the server and added esriConfig.defaults.io.corsEnabledServers to the code but no luck.

Thanks

0 Kudos
MichaelAugust
Occasional Contributor III

Did you guys ever figure this out?

0 Kudos