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.
精彩评论