1

I am writing a C# web service that serves data from a back-end web server. If I want to let other users query this service using client-side code, how would I provide them with API access?

For instance, currently the web service is on Domain1.com. Now, if I want to let someone from Domain2.com access my API using jQuery, how would I do it?

Legend
  • 104,480
  • 109
  • 255
  • 385

1 Answers1

2

You'll need to use the JSONP spec to return your data rather than JSON only. See http://api.jquery.com/jQuery.getJSON/ for full details on how jQuery handles JSONP.

Jeremy
  • 427
  • 2
  • 16