If you are new to Web API, you can always get some information from here Articles Here we are going to share those.Īssume that you have created a Web API and hosted it on your server. Solved the same issues in different ways. Web API on a server, and what that API does is, it will just return the data in JSON format.īut when we try to consume this Web API via an Ajax call, was getting the error “No ‘Access-Control-Allow-Origin’ header is present on the requested resource”. In this post, we will discuss the solutions for this error in detail and we will also discuss Cross Origin Requests. We get this error when we are trying to get some data from another origin may be via an AJAX call.
Origin ‘ is therefore not allowed access”. In this article we are going to few possible fixes we can apply when we get an error “Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.