WCF POST The server encountered an error processing the request. See server logs for more details
<p>Ok, this is driving me nuts.</p>

<p>I've created a WCF service with four endpoints (three with GET and one with POST).</p>

<p>All three GET endpoints are working fine, but I'm unable to get the POST endpoint to work.</p>

<p>My interface:</p>

<pre><code>[ServiceContract]
public interface IFiscalCidadaoWCF
{
    [OperationContract]
    [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "GetConveniosByCoordinate/{latitude}/{longitude}")]
    TelaInicialEnvioViewModel GetConveniosByCoordinate(string latitude, string longitude);

    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "FazerDenuncia")]
    string FazerDenuncia(string model); // this is the one

    [OperationContract]
    [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "GetConvenioById/{convenioId}")]
    ConvenioEnvioViewModel GetConvenioById(string convenioId);

    [OperationContract]
    [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "GetDenunciaByUsuario/{usuarioId}")]
    List&lt;DenunciaEnvioViewModel&gt; GetDenunciaByUsuario(string usuarioId);
}
</code></pre>

<p>My service implementation:</p>

<pre><code> public string FazerDenuncia(string model)
 {            
     return "OK";
 }
</code></pre>

<p>Webconfig:</p>

<pre><code>&lt;system.serviceModel&gt;
  &lt;services&gt;
    &lt;service name="FiscalCidadaoWCF.FiscalCidadaoWCF"&gt;
      &lt;endpoint address="../FiscalCidadaoWCF.svc" binding="webHttpBinding"    contract="FiscalCidadaoWCF.IFiscalCidadaoWCF"behaviorConfiguration="webBehaviour" /&gt;
    &lt;/service&gt;
  &lt;/services&gt;
&lt;behaviors&gt;
  &lt;serviceBehaviors&gt;
    &lt;behavior&gt;
      &lt;serviceMetadata httpGetEnabled="true" /&gt;        
      &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt;
    &lt;/behavior&gt;
  &lt;/serviceBehaviors&gt;
  &lt;endpointBehaviors&gt;
    &lt;behavior name="jsonBehavior"&gt;
    &lt;/behavior&gt;
    &lt;behavior name="webBehaviour"&gt;
      &lt;webHttp /&gt;
    &lt;/behavior&gt;
  &lt;/endpointBehaviors&gt;
&lt;/behaviors&gt;
&lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true" /&gt;
&lt;/system.serviceModel&gt;
&lt;system.webServer&gt;
  &lt;httpProtocol&gt;
    &lt;customHeaders&gt;
      &lt;add name="Access-Control-Allow-Origin" value="*" /&gt;
      &lt;add name="Access-Control-Allow-Headers" value="Content-Type, Accept" /&gt;
    &lt;/customHeaders&gt;
  &lt;/httpProtocol&gt;
  &lt;modules runAllManagedModulesForAllRequests="true" /&gt;
  &lt;directoryBrowse enabled="true" /&gt;
&lt;/system.webServer&gt;
</code></pre>

<p>I'm testing using Postman and a client project using jQuery. Neither are working.</p>

<p>jQuery call:</p>

<pre><code> var data2 = "weba";

 $.ajax({
    type: "POST",
    url: 'http://www.fiscalcidadao.site/FiscalCidadaoWCF.svc/FazerDenuncia',
    data: data2,
    success: function (data) {
        alert('working');
    },
    error: function (request, status, error) {
        alert('shut up');
    },
});
</code></pre>

<p>I'm getting the error "The server encountered an error processing the request. See server logs for more details". <strong>But, if I try to call without parameters, the endpoint returns "Ok".</strong> </p>

<p>So my question: What should I change in my project to make the POST endpoint to work passing a parameter? Or how can I find the "server logs" to see what's going on?</p>