title: Test WCF with JSON Response
body: <p>I have a WCF Service that return a json. I want to test it using Fiddle (this is the application that is used in the tutorial i was following). The problem is that i get HTTP 404 error when invoking "AddAngajat" for example.</p>
  
  <p>Implementation of the service : </p>
  
  <pre><code>[ServiceBehavior(InstanceContextMode=InstanceContextMode.Single, AddressFilterMode=AddressFilterMode.Any)]
      public class AngajatService : InterfaceAngajat
      {
          List&lt;Angajat&gt; listaAngajati =null;
  
          public AngajatService()
          {
              if (listaAngajati == null)
                  listaAngajati = new List&lt;Angajat&gt;();
          }
  
          [WebInvoke(Method="POST", UriTemplate = "AddAngajat", ResponseFormat=WebMessageFormat.Json)]
          public void AddAngajat(Angajat angajat)
          {
              listaAngajati.Add(angajat);
          }
          public Angajat[] GetAllAngajati()
          {
              listaAngajati.Add(new Angajat() { idAngajat = "2f34", nume = "nume1" });
              return listaAngajati.ToArray();
          }
      }
  </code></pre>
  
  <p>App.config :</p>
  
  <pre><code> &lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.0"/&gt;
    &lt;/system.web&gt;
    &lt;system.serviceModel&gt;
      &lt;services&gt;
        &lt;service name="testJSON.AngajatService"&gt;
          &lt;endpoint address="mex" binding="mexHttpBinding" bindingConfiguration=""
            contract="IMetadataExchange" /&gt;
          &lt;endpoint address="json" behaviorConfiguration="JSONEndpointBehavior"
            binding="webHttpBinding" bindingConfiguration="" contract="testJSON.InterfaceAngajat" /&gt;
          &lt;host&gt;
            &lt;baseAddresses&gt;
              &lt;add baseAddress="http://localhost/testJSON/" /&gt;
            &lt;/baseAddresses&gt;
          &lt;/host&gt;
        &lt;/service&gt;
      &lt;/services&gt;
      &lt;behaviors&gt;
        &lt;endpointBehaviors&gt;
          &lt;behavior name="JSONEndpointBehavior"&gt;
            &lt;webHttp/&gt;
          &lt;/behavior&gt;
        &lt;/endpointBehaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name=""&gt;
            &lt;serviceMetadata httpGetEnabled="true"/&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="false"/&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true"/&gt;
    &lt;/system.serviceModel&gt;
    &lt;system.webServer&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Any idea on how to fix this ? Other way of testing it ?</p>