Configurationless WCF using Factories and JSONP

Posted by FlySwat on Stack Overflow See other posts from Stack Overflow or by FlySwat
Published on 2010-02-28T16:38:12Z Indexed on 2010/05/21 23:40 UTC
Read the original article Hit count: 830

Filed under:
|
|

I'm using the WebServiceHostFactory in my WCF services to avoid having to create a crapton of binding configuration in web.config.

However, I'd like to expose the services as XML/JSON and JSONP.

Reading: http://jasonkelly.net/archive/2009/02/24/using-jquery-amp-jsonp-for-cross-domain-ajax-with-wcf-services.aspx

It does not look like I can extend WCF to add JSONP without resorting to a mountain of custom binding config.

So, for those who have done it, is it possible to have a restful WCF service that responds in XML/JSON/JSONP depending on the UriTemplate, without resorting to a ton of config wiring?

© Stack Overflow or respective owner

Related posts about wcf

Related posts about jsonp