[Mono-list] WCF with JSONP

meph728 meph728 at web.de
Sun May 6 07:26:02 UTC 2012


Hello,

I'm writing a WCF service that returns JSON*P* Data. The problem is that all
calls returns allways normal JSON and the "CALLBACK" is ingnored. The same
servive is running under MS .NET without Problems...


  ServiceHost ServiceHost = new ServiceHost (typeof(Service));
  // Service configuration via ".config", but binding attribute
crossDomainScriptAccessEnabled="true" fails. Therfore setting
crossDomainScriptAccessEnabled here...
  WebHttpBinding b =
(WebHttpBinding)ServiceHost.Description.Endpoints[0].Binding;
  b.CrossDomainScriptAccessEnabled=true;
  ServiceHost.Open ();


Does anybody have the same problem?  

Thanks in advance! 

Kind regards, 
Marc

--
View this message in context: http://mono.1490590.n4.nabble.com/WCF-with-JSONP-tp4612431.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list