title: jQuery ajax call works fine on localhost but not remote
body: <p>i´ve been searching for the answer but still haven't found anything that did help. I'm working on a phoneGap + jqm application and for the time of developing, i've tested all through chrome and a local instance of my asp.net project (running on localhost and visual studio developmentserver). I'm even handling the the js calls as JSONP on the server side. Everything worked just fine as i was working on locahost but after publishing the asp project to the server i don't get a response for the ajax calls. What am i doing wrong?</p>
  
  <p>Here's what the jqm init looks like:</p>
  
  <pre><code>    $.support.cors = true;
      $.mobile.allowCrossDomainPages = true;
      $.mobile.phonegapNavigationEnabled = true;
  
      $.mobile.linkBindingEnabled = true;
      $.mobile.ajaxEnabled = true;
  
   $.ajax({
              async: isAsync,
              crossDomain: true,
              timeout: 5000,
              url: "https://pathToService/MobileService.asmx/" + methodName,
              data: dataAry,
              dataType: "jsonp",
              beforeSend: function () {
                  // This callback function will trigger before data is sent
                  $.mobile.loading('show', { theme: "a", text: "Loading...", textonly: false, textVisible: false }); // This will show AJAX spinner
              },
              complete: function () {
                  // This callback function will trigger on data sent/received complete
                  $.mobile.loading('hide'); // This will hide AJAX spinner
              },
              success: function (succResult) {
                  callback(succResult)
              },
              error: function (errorResult) {
                  app.showAlert("Es ist ein Fehler bei dem Verbindungsaufbau zum Server aufgetreten. Bitte versuchen Sie es zu einem sp&amp;auml;teren Zeitpunkt nochmal.", "Fehler")
              }
          })
  </code></pre>
  
  <p>I've also tried it without https but same thing. I've also checked the service through the browser and a SOAP Client and got a valid response.</p>
  
  <p>Here's one of the server side methods:</p>
  
  <pre><code>            &lt;WebMethod&gt; _
  &lt;ScriptMethod(UseHttpGet:=True, ResponseFormat:=ResponseFormat&gt; _
  Public Sub IsSystemAvailable(callback As String)
          CompleteRequest(callback, True)
      End Sub
  
  Private Sub CompleteRequest(callback As String, objectToSerialize As Object)
      Dim sb As New StringBuilder()
      Dim js As New JavaScriptSerializer()
      sb.Append(callback &amp; "(")
      sb.Append(js.Serialize(objectToSerialize))
      sb.Append(");")
  
      Context.Response.Clear()
      Context.Response.ContentType = "application/json"
      Context.Response.Write(sb.ToString())
      Context.Response.[End]()
  End Sub
  </code></pre>
  
  <p>There' no real error coming from the ajax handler, just the console logs the following output:</p>
  
  <pre><code> GET https://pathToWebservice/MobileService.asmx/Log…ino&amp;password_hash= some hash           jquery-1.10.2.min.js:6 
  send                                        jquery-1.10.2.min.js:6 
  x.extend.ajax                               index.js:266 
  doRequestWith                               index.js:242 
  CheckLoginSynchroniously                    index.js:151 
  app.loginToHQ                               index.html:34 
  onclick
  </code></pre>
  
  <p>Any idea??</p>