I created a simple function
[OperationContract] [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json)] string Start();
Definition
public String Start() { JavaScriptSerializer serializer = new JavaScriptSerializer(); return serializer.Serialize("Check"); }
From a browser using Javascript / JQuery, http: //localhost/service1.svc tells me that I created the service and all the other information. Looks nice.
I am trying to call it using http: //localhost/service1.svc/Start
I get 400 bad requests for this call. Hope I'm not doing anything wrong here. Should I have access to the WCF service from a browser? I tried searching a lot before I thought about publishing. But I canβt understand that this basic work upsets me.
EDIT and UPDATE Now I'm at this point. The service page indicates that the metadata service is disabled and asks me to insert the following text
<serviceMetadata httpGetEnabled="true" />
I inserted the text - but still it shows the same text !! This is getting too confusing now.
source share