sábado, 9 de julio de 2022

ASP.NET Web Forms: No 'Access-Control-Allow-Origin' header is present on the requested resource

 Es necesario configurar el web config:


<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <httpProtocol>
      <customHeaders>
        <add name="Access-Control-Allow-Origin" value="*" />
        <add name="Access-Control-Allow-Methods" value="GET,POST,OPTIONS" />
        <add name="Access-Control-Allow-Headers" value="Content-Type, soapaction" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>

No hay comentarios:

Publicar un comentario

Comenta cualquier duda o recomendatorio.