Unable to Access Most Esri Basemaps in WebAppBuilder (Enterprise)

1043
10
06-28-2022 08:34 AM
JCGuarneri
Occasional Contributor II

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:

JCGuarneri_0-1656430145691.png

 

In web app builder, I see this in the basemap widget:

JCGuarneri_1-1656430174860.png

 

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:

https://enterprise.arcgis.com/en/server/latest/administer/linux/restricting-cross-domain-requests-to...

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?

 

0 Kudos
10 Replies
ElizabethLorenaRodriguez
New Contributor III

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-

0 Kudos
JCGuarneri
Occasional Contributor II

I just tried that now, and it did not work. Thanks for the suggestion!

 

Jay

0 Kudos
ElizabethLorenaRodriguez
New Contributor III

Hi!

 

Are you working with developer edition of web AppBuilder, or the application is on Portal?

0 Kudos
JCGuarneri
Occasional Contributor II

The built-in application in Portal, on Enterprise 10.8.1.

0 Kudos
ElizabethLorenaRodriguez
New Contributor III

I found the following technical article: https://support.esri.com/en/Technical-Article/000016360

 

 

The procedure is similar in Portal. Have you tried it?

 

 

0 Kudos
JCGuarneri
Occasional Contributor II

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.

0 Kudos
ElizabethLorenaRodriguez
New Contributor III

Have you checked in IIS ? the allow origins set to * in http response headers section

 

cupuO.jpg

 

 

 

 

 

 

JCGuarneri
Occasional Contributor II

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.

0 Kudos
ElizabethLorenaRodriguez
New Contributor III

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 

0 Kudos