title: WCF Service - Failed to Invoke service - JSON
body: <blockquote>
    <p>Failed to invoke the service. Possible causes: The service is offline
    or inaccessible; the client-side configuration does not match the
    proxy; the existing proxy is invalid. Refer to the stack trace for
    more detail. You can try to recover by starting a new proxy, restoring
    to default configuration, or refreshing the service.</p>
  </blockquote>
  
  <pre><code>The Address property on ChannelFactory.Endpoint was null.  The ChannelFactory's Endpoint must have a valid Address specified.
     at System.ServiceModel.ChannelFactory.CreateEndpointAddress(ServiceEndpoint endpoint)
     at System.ServiceModel.ChannelFactory`1.CreateChannel()
     at System.ServiceModel.ClientBase`1.CreateChannel()
     at System.ServiceModel.ClientBase`1.CreateChannelInternal()
     at System.ServiceModel.ClientBase`1.get_Channel()
     at InstantBankVerificationPostBackClient.PostBack(String data)
  </code></pre>
  
  <p><strong>Web.Config:</strong></p>
  
  <pre><code>&lt;services&gt;
      &lt;service behaviorConfiguration="DebugJSonBehavior" name="IBVWebService.InstantBankVerificationPostBack"&gt;
          &lt;endpoint address="http://localhost:64337/InstantBankVerificationPostBack.svc" 
              binding="webHttpBinding"
              contract="IBVWebService.IInstantBankVerificationPostBack"
              behaviorConfiguration="webBehavior"&gt;
              &lt;identity&gt;
                &lt;dns value="localhost" /&gt;
              &lt;/identity&gt;
          &lt;/endpoint&gt;
          &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt;
      &lt;/service&gt;
  &lt;/services&gt;
  
  &lt;behaviors&gt;
      &lt;endpointBehaviors&gt;
          &lt;behavior name="webBehavior"&gt;
              &lt;webHttp/&gt;
          &lt;/behavior&gt;
      &lt;/endpointBehaviors&gt;
      &lt;serviceBehaviors&gt;
          &lt;behavior name="DebugJSonBehavior"&gt;
              &lt;serviceMetadata httpGetEnabled="true" /&gt;
              &lt;serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" /&gt;
          &lt;/behavior&gt;
      &lt;/serviceBehaviors&gt;
  &lt;/behaviors&gt;
  </code></pre>
  
  <p><strong>Interface:</strong></p>
  
  <pre><code>[OperationContract]
  [WebInvoke(Method = "POST",
  BodyStyle = WebMessageBodyStyle.WrappedRequest,
  RequestFormat = WebMessageFormat.Json)]
  void PostBack(string data);
  </code></pre>