Jquery,C#webservice [英] Jquery, C# webservice

查看:96
本文介绍了Jquery,C#webservice的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下错误显示在Ajax调用中

XMLHttpRequest无法加载http://demo.play2learn.in/service/AssessmentListMobileService.asmx/set_UserRegistration_Details。请求的资源上不存在Access-Control-Allow-Origin标头。来源



如何调用跨域Web服务。

服务器和本地PC需要哪些设置调用跨域服务。

Following Error Showing In Ajax Call
XMLHttpRequest cannot load http://demo.play2learn.in/service/AssessmentListMobileService.asmx/set_UserRegistration_Details. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin

How To Call Cross Domain Webservices.
And Which Setting Required on Server and Local Pc To call Cross Domain Services.

推荐答案

在您的Web服务中启用CORS。



请参阅以下链接。



http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api
Enable CORS in your Web Service.

Please see below link.

http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api


请检查这个



请求的资源上没有'Access-Control-Allow-Origin'标头 [ ^ ]



请求的资源错误上没有'Access-Control-Allow-Origin'标头 [ ^ ]



XMLHttpRequest无法加载,没有'Access-Control-Allow-Origin'存在 [ ^ ]
please check this

"No 'Access-Control-Allow-Origin' header is present on the requested resource"[^]

No 'Access-Control-Allow-Origin' header is present on the requested resource error[^]

XMLHttpRequest cannot load, No 'Access-Control-Allow-Origin' is present[^]


这篇关于Jquery,C#webservice的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆