如何使用jquery使用安全的跨域wcf休息Web服务 [英] how to consume secure cross domain wcf rest web service using jquery

查看:80
本文介绍了如何使用jquery使用安全的跨域wcf休息Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在详细信息中我创建了一个休息wcf服务并实现了安全性,而我从同一个源使用它然后没有问题(使用数据类型json在头中传递凭证)但是当我们使用相同形式的不同域时,如果我们使用它则通过错误401数据类型jsonp然后我无法在标头中传递凭证。我也有谷歌很多,但没有找到任何更好的解决方案。

In Details i have created a rest wcf service and implemented security while i consume it from same origin then no issue(passing credential in header using datatype json) but when we consume same form different domain then it through error 401 if we use datatype jsonp then i am not able to pass credential in header. also i have google alot but didn't find any better solution.

推荐答案

你将不得不使用Jsonp格式(不是json)



请参考消费跨域使用JSONP的jQuery的WCF REST服务 [ ^ ]
You will have to use Jsonp format ( not json)

Please refer Consuming Cross-Domain WCF REST Services with jQuery using JSONP[^]


这篇关于如何使用jquery使用安全的跨域wcf休息Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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