Mandar Shinde

Mandar Shinde

  • 1.5k
  • 346
  • 11.9k

Response to preflight request doesn't pass access control

Jun 5 2019 8:41 AM
Dear All,
I have created small project using Angular 6 and ASP .Net MVC 5. I have uploaded my those project with help of member of this forum. Thanks to them for helping me.
I got stuck again I was facing problem related to refresh, to overcome on that problem I get come to know that I have to use URL rewrite. So I just follows those steps, now I can refresh the page but I am getting error and It is related to CORS.
Before this I was using that code as localhost but now I want to connect with domain.
I am getting following error :-
  1. Access to XMLHttpRequest at 'http://www.angulardemo.in/eapp/api/Login' from origin 'http://angulardemo.in' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.  
 How can I overcome on above problem?
 Please let me any easy solution. Any suggestion will be acceptable.
Thanking You in advance. 
 

Answers (5)