0
add EnableCORS on the action in your controller
0
I'm assuming the code is calling the Web API. If that the case, there is a section in this article that describe on how to Enabling Cross-Origin Requests (CORS).
Web API - Enabling Cross-Origin Requests (CORS)
Technically, the Web API can be hosted together with the Web Application or separately. In this sample application, the Web API and Web Application are being decoupled. That being said, the Web and API application could be hosted on a different subdomain or domain. By design, the web browser security, same-origin policy, will prevents a web page from making AJAX requests to another domain or subdomain. However, this issue can be overcome by Enabling Cross-Origin Requests (CORS) to explicitly allow cross-origin requests from the Web to the API application.
http://www.c-sharpcorner.com/article/asp-net-mvc-tooltip-using-web-api-bootstrap-popover-and-jquery-ui-dialog/
0
you can refer the link for more clear information about it:https://stackoverflow.com/questions/15005500/loading-cross-domain-endpoint-with-jquery-ajax
0
Hi,
You have to give "Access-Control-Allow-Origin" header in your ajax content.
- Response.AppendHeader("Access-Control-Allow-Origin", "*");