I have a curious issue with the Esri basemaps in my Enterprise web apps in 10.8.1. When I add a basemap switcher widget, I only see a selection of the Esri basemaps. Everywhere else (web maps, dashboards, etc) I see this in the basemap gallery:
In web app builder, I see this in the basemap widget:
I'm not sure what's going on with those duplicates, either. Anyway, when I look at the developer console in my browser, I get the error :
XMLHttpRequest at 'https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer?f=json' from origin 'https://myserver.mydomain.com' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute..
The only thing I could find to resolve this was changing settings in Server Admin per this page:
but that did not resolve it. I also find it curious that it's only an issue for WebAppBuilder. Has anyone else encountered this problem? And did you find a solution?
Hi @JCGuarneri
Have you tried to add the domain into the allow origins in Portal for ArcGIS security settings?
To do so:
1. Login as administrator
2. Go to Organization>Settings>Security
3. In Allow origins section include https://services.arcgisonline.com
4. Save edits and try again
Regards
Lorena-
I just tried that now, and it did not work. Thanks for the suggestion!
Jay
Hi!
Are you working with developer edition of web AppBuilder, or the application is on Portal?
The built-in application in Portal, on Enterprise 10.8.1.
I found the following technical article: https://support.esri.com/en/Technical-Article/000016360
The procedure is similar in Portal. Have you tried it?
Yes, that's how I have the basemaps available in my gallery at all. The problem isn't that the maps aren't shared, it's that there's a CORS error when I try to connect to them, but only through the WebAppBuilder. And only for some of the basemaps.
Have you checked in IIS ? the allow origins set to * in http response headers section
Hmmm.... I don't have that parameter set to anything. The only parameter I have set is X-Powered-By. I tested on my dev portal, and it works there. The HTTP Response headers are set the same. The biggest difference between the two portals is that dev is on 10.9.1. I'll also have to double-check whether the SSL certs are set up the same.
I read that could be also an issue of Internet explorer version, but not sure about it. Do you have in both servers the same version of internet explorer?, Also check if TLS 1.2 is enabled in both of them, (internet options).
One test you can do is try to access the url https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer?f=json in internet explorer on the server where Portal is installed