asp.net - Jquery call wcf service giving 200 Parser Error -
i'm new wcf world. i'm having solution contains web app(which has jquery ajax call wcf services application project in solution. after 2 days of working(cracking) i'm in state able pass request , response 
but while try show in alert gives me 200 parser error.
any highly appreciate
further ref
$.ajax({ async: true, type: 'get', //get or post or put or delete verb url: 'http://localhost:61057/service1.svc/getcustomer', // location of service datatype: 'jsonp', //expected data format server success: function (data) {//on successfull service call servicesucceeded(data); }, error: function () { servicefailed(data); } // when service call fails }); web.config
<system.servicemodel> <services> <service name="fin.services.service1" behaviorconfiguration="defaultbehavior"> <endpoint address="http://localhost:61057/service1.svc" binding="webhttpbinding" contract="fin.services.iservice1" behaviorconfiguration="ajaxbehavior"> <identity> <dns value="locahost"/> </identity> </endpoint> <endpoint contract="imetadataexchange" binding="mexhttpbinding" address="mex"/> </service> </services> <bindings> <webhttpbinding> <binding name="webbinding"> <security mode="none"> </security> </binding> </webhttpbinding> </bindings> <behaviors> <servicebehaviors> <behavior name="defaultbehavior"> <servicemetadata httpgetenabled="true"/> <servicedebug includeexceptiondetailinfaults="true"/> </behavior> </servicebehaviors> <endpointbehaviors> <behavior name="ajaxbehavior"> <enablewebscript/> </behavior> </endpointbehaviors> </behaviors> </system.servicemodel> service interface :
[webinvoke(responseformat = webmessageformat.json, method = "get", bodystyle = webmessagebodystyle.wrappedrequest, requestformat = webmessageformat.json)] [operationcontract] string getcustomer();
if need no argument, add following in ajax call ..
data: "{}",
Comments
Post a Comment