6

This is probably a long shot but here it is.

We have ArcGIS Server 10.3.1 installed and a simple map service deployed on it. We are accessing the map service via custom javascript/html applications (one of which is ESRI's Roadway Characteristics Editor or RCE).

Accessing the unsecured map service via http://mapserver:6080 presents no problems nor does accessing it via the ESRI Web Adapator url (http://mapserver/arcgis).

enter image description here

However, enabling security through the Windows Domain at the Web Tier causes the following errors to start appearing in our web application calls to the map service.

GET http://dev-gis/arcgis/rest/info?f=json
XMLHttpRequest cannot load http://dev-gis/arcgis/rest/info?f=json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://dev-app' is therefore not allowed access. The response had HTTP status code 401.

Now, it appears that there is a CORS error, however the CORS policies were enabled with Web Adaptor (which should only apply for Silverlight and Flex anyways) and there are no CORS issues when the Windows Domain authentication is not enabled.

This is how the security is configured for the Web Adaptor in IIS

enter image description here

I have tried enabling CORS via the web.config for the Web Adaptor (although this shouldn't be necessary) by adding the following lines.

<httpProtocol>
   <customHeaders>
     <add name="Access-Control-Allow-Origin" value="*" />
   </customHeaders>
 </httpProtocol>

which gets me to here

GET http://dev-gis/arcgis/rest/info?f=json 401 (Unauthorized)

enter image description here

Obviously this is a problem for any of our applications if we are trying to access via domain authentication.

The question is, has anyone else run into this problem and if so, how did you solve it. I believe that I have tried everything in my bag of tricks at this point and am out of ideas.

Update 1

Per Mintx question, the GIS Server is configured with the Web Adaptor

enter image description here

and Web Tier authenction has been enabled for ArcGIS Server.

enter image description here

  • Web adaptors are tricky so I'll start with the obvious. It sounds like you registered the web adaptor with the GIS server. Did you also enable Web Tier authentication on the GIS server? – Mintx May 29 '15 at 21:29
  • Looks like you're loading a previously generated token...any chance there's been some hostname, authentication, etc. changes since that token was generated? If so, maybe you just need a fresh one. – wchatx Jun 1 '15 at 14:30
  • Any solution found to this? I'm having the same problem. – CaptDragon Aug 24 '15 at 15:23
3

I was having the same exact problem. What finally worked for me is adding the following to the ROOT site and NOT the application for the web adapter. Does it make sense? Not to me. But it worked for me.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
      <httpProtocol>
       <customHeaders>
         <add name="Access-Control-Allow-Origin" value="*" />
       </customHeaders>
      </httpProtocol>

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.