This article is a mirror article of machine translation, please click here to jump to the original article.

View: 18172|Reply: 0

[WebAPI] WebAPI does not support workarounds for cross-domain requests

[Copy link]
Posted on 8/9/2016 5:24:21 PM | | | |


Previously, I encountered a cross-domain request from a controller, and then I knew that just adding a few sentences to the web.config was enough.

This time add the following to the web.config:



Find, or not allow cross-domain requests, why????? Is webapi different from controller?

It may be really different, and the solution is as follows:




The webapi is as follows:



Successfully solved!




Previous:C# 2, 10, 16 and 16 and their ASCII codes
Next:C# compresses data when posting data
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com