在Visual Studio 2013 Express for Web中调试Web应用程序时出现以下错误。这个应用程序是MVC与angularjs,jquery,bootstrap。我有其他的网络应用程序工作正常,没有这个错误,我不知道在哪里寻找解决这个问题。我将web.configs,global.asax等与正在工作的项目进行了比较。调试时访问控制允许来源错误
我可以通过创建一个新的Web项目来重现此行为,并选择MVC。当我调试这个新项目时,我得到了同样的错误。
XMLHttpRequest cannot load http://ssl.socialprivacy.org/native/pagehandler.php.
The 'Access-Control-Allow-Origin' header has a value 'http://localhost'
that is not equal to the supplied origin. Origin 'http://localhost:54400'
is therefore not allowed access.
我在这里看到了另一个问题,但它不能解决我的问题。 Access-Control-Allow-Origin error
你想从另一个域访问数据吗? –
不,看看错误,这与端口号有关:54400 –