1

If WCF REST Service is hosted in a different domain than the client-side pages (using basically HTML, CSS and Javascript), how are we able to consume this WCF REST Service ? I read an article which suggests using JSONP so as to circumvent the same origin policy. Basically on the client side when we make an ajax call we simply set dataType to jsonp, set jsonpCallback to some function name, contentType to application/javascript and set crossDomainScriptAccessEnabled to be true in Web.config. Is it correct ? Are there other ways ?

Will Hartung
  • 115,893
  • 19
  • 128
  • 203
Yinfang Zhuang
  • 443
  • 1
  • 5
  • 15
  • 1
    possible duplicate of [Ways to circumvent the same-origin policy](http://stackoverflow.com/questions/3076414/ways-to-circumvent-the-same-origin-policy) – josh3736 Feb 19 '12 at 03:36

0 Answers0