开发者

Calling WCF service from multiple domain clients

I have a WCF service that I access fram Javascript using AJAX and JSON. 开发者_运维问答The client and the service is on the same site (domanin). It works great.

I now need to call the same service from several other sites/domains. How is this done? So far I have not found any resources describing this scenario.

These sites uses ASP.NET 4.0 (C#).


I agree that you need JSONP but I don't agree with using custom behavior from WCF 3.5 samples. WCF 4 has a native support for JSONP by turning on crossDomainScriptAccessEnabled in the webHttpBinding configuration. I wrote an example in this question.


you need use jsonp.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜