Search code examples
javascriptcordovaphonegap-cli

No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4400' is therefore not allowed access


XMLHttpRequest cannot load http://localhost:5100/MYService.asmx/Myweb-Method. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4400' is therefore not allowed access.

I have problem in cordova visual studio.

What should i do please give me some suggestion


Solution

  • Download the Allow-Control-Allow-Origin application from google chrome. Enable the CORS in the application installed and execute your code. This will temporarily allow the CORS in your browser.