Join the Stack Overflow Community
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

I am trying to upload csv file from angular POST to Web API post but Eeb api return below error

"XMLHttpRequest cannot load http://localhost:89/WebService/Upload. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://Application:90' is therefore not allowed access. The response had HTTP status code 404."

Note : Normal post with JSON data working after doing cross enable in web api, only issue with file upload .

share|improve this question

This is because the server is not returning the 'Access-Control-Allow-Origin' header with your 'localhost' origin.

So this problem can be solved as follows:

  • Add support for CORS at server side to allow your origin (localhost) to make requests.
  • or by disabling the CORS in your browser, similar kind of problem is already discussed here also Disable same origin policy in Chrome
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.