AnsweredAssumed Answered

XMLHttpRequest  Error

Question asked by ykchin on Dec 16, 2014

I am investigating an error message in console.

Error:

XMLHttpRequest cannot load http://[url]/arcgis/rest/info?f=json. The 'Access-Control-Allow-Origin' header contains multiple values '[url], *', but only one is allowed. Origin '[url]' is therefore not allowed access.

In our web.config, it seems to be what it needs to be:

<?xml version="1.0" encoding="utf-8"?>

<configuration>

<system.webServer>

   <httpProtocol>

     <customHeaders>

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

     </customHeaders>

   </httpProtocol>

</system.webServer>

</configuration>

The error does not appear to affect the app, but it keeps popping up in console.
So I am wondering how I can do about this error.

Outcomes