title: WCF Json Rest service not hitting the Methods
body: <p>I am writing a WCF service, (json REST) and I have it working fine when using the wcftestclient.exe </p>
  
  <p>When I run that test tool it triggers my break points while debugging and everything <strong>works</strong> as expected.</p>
  
  <p>but, when using a browser to navigate to the the service and method, no break point is triggered. it seems as though the request isnt even getting to the code.</p>
  
  <p>I receieve no errors on when navigating with web browser to the service, it just doesn't get any data, or trigger the break points.</p>
  
  <p>Apologies if this is a duplicate, I have read and tried many many different configurations found in answers to similar questions, but nothing seems to work.</p>
  
  <p>Many thanks for any help, I've posted my code below.</p>
  
  <p>Martyn</p>
  
  <p>I have setup:
  ServiceContract</p>
  
  <pre><code>[OperationContract]
  [WebGet(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json)]
  List&lt;Country&gt; GetAllCountries();
  </code></pre>
  
  <p>The Service CLass:</p>
  
  <pre><code>    public List&lt;Country&gt; GetAllCountries()
      {
          ControlServiceRepository rep = new ControlServiceRepository();
          return rep.GetAllCountries().ToList() ;
      }
  </code></pre>
  
  <p>and my web config</p>
  
  <pre><code>&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="OmniData" behaviorConfiguration="ServiceConfig"&gt;
          &lt;!-- Service Endpoints --&gt;
          &lt;host&gt;
            &lt;baseAddresses&gt;
              &lt;add baseAddress="http://localhost:55641/"/&gt;
            &lt;/baseAddresses&gt;
          &lt;/host&gt;
          &lt;endpoint address="" binding="webHttpBinding" contract="ControlService.IOmniData" behaviorConfiguration="rest" /&gt;
        &lt;/service&gt;
      &lt;/services&gt;
        &lt;behaviors&gt;
          &lt;endpointBehaviors&gt;
            &lt;behavior name="rest"&gt;
              &lt;webHttp helpEnabled="true"/&gt;
            &lt;/behavior&gt;
          &lt;/endpointBehaviors&gt;
          &lt;serviceBehaviors&gt;
            &lt;behavior name="ServiceConfig"&gt;
              &lt;serviceMetadata httpGetEnabled="true"/&gt;
              &lt;serviceDebug includeExceptionDetailInFaults="false"/&gt;
            &lt;/behavior&gt;
          &lt;behavior&gt;
            &lt;!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --&gt;
            &lt;serviceMetadata httpGetEnabled="true"/&gt;
            &lt;!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information --&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="false"/&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true" /&gt;
      &lt;standardEndpoints&gt;
        &lt;webHttpEndpoint&gt;
          &lt;standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="false" defaultOutgoingResponseFormat="Json"/&gt;
        &lt;/webHttpEndpoint&gt;
      &lt;/standardEndpoints&gt;
    &lt;/system.serviceModel&gt;
   &lt;system.webServer&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
    &lt;/system.webServer&gt;
  </code></pre>