Ahjesus enables my MVC web API to support JsonP cross-origin and ahjesusjsonp
Numerous people who encounter a successful request but cannot access success always prompt parsererror. Refer to the two articles.
Reference http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api
And
Http://diaosbook.com/Post/2013/12/27/tips-for-aspnet-webapi-cors
Does the jsonp data returned from cross-origin need to be provided to the callback function?
The backend only needs to return a string of Data copied by this function name (json name). The reason why the domain name json is a kind of data name seems to be a bit understandable, json is a type of data name. It does not support cross-domain data. The p of jsonp indicates filling, which means filling a function in front of json data and executing it using the script tag, in order to achieve the effect of cross-origin is not beautiful, is that true? Cross-origin means that you are not allowed to obtain the data name is not affected, of course, the misappropriation will define the jsonxxx function jsonp because the js script is loaded without cross-origin, so you do not need to use ajax to use a script tag through the process his src visit the ghost website background This src will add a jsonp = jsonpxxx parameters to identify the misappropriation of function name
Js required for cross-origin access to ajax jsonp in Extjs
<Script type = "text/javascript" src = "Ext/adapter/ext/ext-base.js"> </script>
<Script type = "text/javascript" src = "ext/ ext-all.js"> </script>
<Script type = "text/javascript" src = "/ext/ ext-basex.js"> </script>
Just add the three.
It is best to add <script type = "text/javascript" src = "/Ext/src/locale/ext-lang-zh_CN.js"> </script>
Avoid gibberish