javascript – CORS header ‘Access-Control-Allow-Origin’ missing en aspx


I have an application that uses a Java script function and sends a call to consume a web service.

Everything works fine but nothing shows up in the browser.

When I see the console I get a message CORS header 'Access-Control-Allow-Origin' missing

I have tried searching in various places but I have no answer. Any ideas

The code is made in C # and aspx


There is a site dedicated to providing CORS information for any technology. In your case, as you mention that you use ASP web services, I suppose that the information that will be useful to you is related to IIS7:

Taking a quick look at it, you will have to modify your web.config (where your web services are) to include the following information.

<?xml version="1.0" encoding="utf-8"?>
       <add name="Access-Control-Allow-Origin" value="*" />
Scroll to Top