AnsweredAssumed Answered

No 'Access-Control-Allow-Origin' HELP!!

Question asked by deleted-user-1_r2dgYuILKY on Nov 2, 2017
Latest reply on Nov 8, 2019 by amarsden

I've been dealing with this issue for a while. I have a geoprocessing tool on the ArcGIS server that generates a report from a map click. I get the CORS error when the server tries to return the report PDF to the popup in the map window. 


I've tried adding this to our webconfig file, and it doesn't help. 

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


I tried adding this to my JavaScript code and it worked in once instance, but not another."")


I've also tried removing these lines from the webconfig and adding "Access-Control-Allow-Origin, * " under HTTP response headers in our IIS web server manager and I get this error "The 'Access-Control-Allow-Origin' header contains multiple values 'null, *', but only one is allowed. Origin 'null' is therefore not allowed access."


I'm pulling my hair out trying figure this out.