json - WCF - JSONP Content-Length Issue -


scenario:

web service needed calculate values , send results json. these calls made cross-domain i'm using jsonp. problem i'm having occurs both on same domain , cross-domain.

problem:

i'm having issue getting json data wcf service. while on local machine works fine, when on server response service cut short (if run through visual studio on server though, it's fine).

the content length seems set length of response before wrapping in jquery callback function (example data below).

local: jquery151017220264650085249_1309423933796({"d":"[\"flat\",\"terrace\",\"semi\",\"detached\",\"bungalow\"]"});

local: jquery151017220264650085249_1309423933797({"d":"[\"new build\",\"2000 2010\",\"1990 2000\",\"1970 1990\",\"1950 1970\",\"pre 1950\"]"});

live: jquery1510246237260361726_1309424024004({"d":"[\"flat\",\"terrace

live: jquery1510246237260361726_1309424024005({"d":"[\"new build\",\"2000 2010\",\"1990 2000\",\"1970 to

to wrap json response callback function had use httpmodule found on net.

the server uses iis 7.5, locally i'm using visual studio. (some kind of iis configuration?)

right, i've provided enough information, if not let me know.

so if has idea how fix issue appreciated.

thanks

you don't need use http module wrap response in jsonp - feature available in wcf 4.0. can set property crossdomainscriptaccessenabled in webhttpbinding, , if request comes different domain (and has ?callback=functionname) parameter, response wrapped in functionname(...).


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -