Click here to Skip to main content
13,149,738 members (55,461 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Can anyone point me to some example code that shows how to setup a cross domain webservice that will return JSON in a .asmx / ASP.NET 3.5 page? Cant seem to find a comprehensive examples.

I want to avoid MVC or WCF - especially now that the ASP.NET Web API is the latest and greatest but the smoke hasn't cleared w respect to native support (I think). Ive seen folks saying that a custom formatter can be added to the Web API formatter collection etc but that the code only works with the CodePlex version and builds are in flux and better to wait for RTM.

Ive set up successful web services in asmx pages and used jQuery to get JSON but now need to deliver an API so external partners on other domains can hit the service and get JSON formatted data back. My weak understanding is that callbacks are required along with it being neccessary to add an HttpModule to set the content-type ?

Cheers & thanx in advance !
Posted 11-Jul-12 7:06am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

It would be easy with WCF:[^] even though you say you want to avoid WCF.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170924.2 | Last Updated 22 Jul 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100