title: ASP.NET AJAX Refused to get unsafe header "jsonerror"
body: <p>Using ASP.NET AJAX I am getting the following error in Chrome and Mozilla firefox when I call an asmx webservice with the <code>[ScriptService]</code> attribute. It works in IE9...</p>
  
  <blockquote>
    <p>Refused to get unsafe header
    "jsonerror"</p>
  </blockquote>
  
  <p>Why is the AJAX script manager trying to add/change that header? And how do I stop it?</p>
  
  <p>My javascript:</p>
  
  <pre><code>// Asynchronous ajax call to lookup this client
  function CallSearch() {
    // Ensure correct SharePoint path is used
    SalesRepSearchWebServices.SalesRepSearchService.set_path(
      "http://localhost:52182/SalesRepSearchService.asmx"
    );
  
    // Get our txtSearch control
    var txtSearch = document.getElementById("ui_txtSearch");
  
    // Call web service
    SalesRepSearchWebServices.SalesRepSearchService.GetResults(
      txtSearch.value,
      "All",
      SearchResponse,
      SearchError
    );
  }
  
  // Get return value from web service
  function SearchResponse(result) {
    alert(result);
    var lblResults = document.getElementById("lblResults");
    lblResults.innerHTML = result;
  }
  
  // Display error from web service
  function SearchError(result) {
    //alert(result.get_message());
    var lblResults = document.getElementById("lblResults");
    lblResults.innerHTML = result.get_message();
  }
  </code></pre>
  
  <p>And a C# snippet:</p>
  
  <pre><code>[WebMethod]
      public List&lt;Person&gt; GetResults(string input, ResultType resultType)
  </code></pre>