-5

XMLHttpRequest cannot load http://localhost:9001/Strategy.svc/NewStrategy. Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header has a value 'http://localhost:9000' that is not equal to the supplied origin. Origin 'http://localhost:4200' is therefore not allowed access.

mojtaba
  • 1
  • 1

1 Answers1

0

You are setting the 'Access-Control-Allow-Origin' header value to 'http://localhost:9000' but the origin hold's value "http://localhost:4200".

Modify such that both of them match.

Please find similar problem with solutions

XMLHttpRequest cannot load - No 'Access-Control-Allow-Origin' header is present on the requested resource

XMLHttpRequest cannot load, No 'Access-Control-Allow-Origin' header is present on the requested resource

Tejaswi Pandava
  • 486
  • 5
  • 17