跨域访问

遇到错误:

XMLHttpRequest cannot load http://XXX.aspx. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.

网上查了查,ajax跨域不允许访问。

Access-Control-Allow-Origin。HTTP响应头,指定服务器端允许进行跨域资源访问的来源域。可以用通配符*表示允许任何域的JavaScript访问资源,但是在响应一个携带身份信息(Credential)的HTTP请求时,Access-Control-Allow-Origin必需指定具体的域,不能用通配符。

暂时没找到解决方法。

posted @ 2014-07-01 15:03  yuhuhu  阅读(223)  评论(0编辑  收藏  举报