Consuming a WCF service from Javascript - getting HTTP 400 on requests for jsdebug -



Consuming a WCF service from Javascript - getting HTTP 400 on requests for jsdebug -

i'm trying create simple javascript test front-end wcf service, front-end isn't working. i've traced problem web page asks service http://..../myservice.svc/jsdebug (which, understand it, returns javascript code proxy client web page can utilize access service) - request returning http 400 -bad request.

in effort cut down problem essentials, i've found can replicate problem simply:

open visual studio 2010 create new project of type wcf service application build run in browser navigate http://localhost:portnumber/service1.svc/jsdebug

the result server returns http 400 - bad request

what's going on here?

update: .svc file in is:

<%@ servicehost language="c#" debug="true" service="webdataproxy.webdataproxy" codebehind="webdataproxy.svc.cs" %>

the service interface looks like:

namespace webdataproxy { [servicecontract(namespace = "http://example.com/webdataproxy")] public interface iwebdataproxy { [operationcontract] list<dataresponse> getdataex(list<datarequest> requests); [operationcontract] dataresponse getdatatest(datarequest request); [operationcontract] string hello(string input); } }

hi can check post help

article calling cross domain wcf service works same domain

http://pranayamr.blogspot.com/2011/06/calling-cross-domain-wcf-service-using.html

wcf javascript-debugger

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -