Last post Jul 14, 2017 05:08 AM by Edward Z
Jul 14, 2017 02:58 AM|vladnech|LINK
I am struggling to get my OData Web Service to return jsonp result when it is required.
Looks like all custom solutions are working well for normal Web API Service, but OData does not provide any flexibility to override the response.
I tried to use WebApiContrib.Formatting.Jsonp lib or custom JsonpFormatter (adding config.Formatters.Insert(0, new JsonpFormatter()) in WebApiConfig) - not luck.
I am still using OData v3, because we have to provide atom xml for some applications.
Jul 14, 2017 05:08 AM|Edward Z|LINK
Could you share us the reason you need jsonp?
After checking the supported format for Odata, it seems it supports XML and Json.
As my understanding, we usually used Jsonp for CORS issue. If so, I would suggest you try add CORS headers to enable CORS.
#How to enable CORS in Odata .NET service?