title: Cross Domain jQuery Ajax Request & WCF REST Service
body: <p>I am calling (Ajax Request) a WCF REST service and the  request is a cross domain request.</p>
  
  <p>If I deploy my service in the same domain, everything works like cream. Eventually in production, the service will be in a different domain.</p>
  
  <p>I am using jQuery 1.5.2. My service returns me an error saying:</p>
  
  <pre><code>errorThrown: "jQuery15208493315000087023_1334089616458 was not called"
  textStatus: "parsererror"
  </code></pre>
  
  <p>Although in Firefox I can see the JSON values but execution falls to the error handler of Ajax request.</p>
  
  <p>My Ajax request is:</p>
  
  <pre><code>function CallService() {
      $.ajax({
          type: "GET", 
          url: "http://SomeService/EmpService.svc/GetValues?dv=1455",
          contentType: "application/json; charset=utf-8",
          dataType: "jsonp", 
          processdata: false,            
          success: function (data) {
              ServiceSucceeded(data);
          },
          error: function (jqXHR, textStatus, errorThrown) {
              debugger;
              alert("Service Error");
              ServiceFailed(jqXHR, textStatus, errorThrown);
          }
      });
  }
  </code></pre>
  
  <p>On WCF Service side, I have configured CrossDomainScriptAccess to true:</p>
  
  <pre><code>&lt;webHttpBinding&gt;
    &lt;binding name="webHttpBindingWithJsonP"
             crossDomainScriptAccessEnabled="true" /&gt;
  &lt;/webHttpBinding&gt;
  </code></pre>
  
  <p>JSON response which I get from the server is:</p>
  
  <pre><code>[{"Message": "Stop On Duty", "MessageTime": "\/Date(1334068773893-0500)\/"},
   {"Message": "Start On Duty", "MessageTime": "\/Date(1334068763540-0500)\/"},
   {"Message": "App_testing_4102012924am", "MessageTime": "\/Date(1334068533627-0500)\/"},
   {"Message": "Kunal_testing_4102012924am", "MessageTime": "\/Date(1334067945510-0500)\/"},
   {"Message": "Alert: Door Open", "MessageTime": "\/Date(1334066280963-0500)\/"}]
  </code></pre>
  
  <p>Am I missing anything here in the settings. Entire code works fine if the service is moved to the same domain.</p>
  
  <p>I looked into similar post but couldn't make this work.</p>