@Sam Wu-MSFT The config you have posted does not work. Still the same same error. I have tried all in this document cors-module-configuration-reference
But still receiving the same same error as @Joe Green
Any suggestions?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have IIS 8.5 running on Win 2012 R2 server. I installed CORS module from here https://www.iis.net/downloads/microsoft/iis-cors-module. Created a web.config file with this
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<cors enabled="true" failUnlistedOrigins="true">
<add origin="*" />
</cors>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
In IIS Manager, under HTTP Response Headers, I added Access-Control-Allow-Origin with a value of *.
Still I'm getting the CORS error - Access to XMLHttpRequest at 'https://google.com' from origin 'http://mysite.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
What am I doing wrong?
Joe
@Sam Wu-MSFT The config you have posted does not work. Still the same same error. I have tried all in this document cors-module-configuration-reference
But still receiving the same same error as @Joe Green
Any suggestions?