title: ajax API remote server: No 'Access-Control-Allow-Origin' header is present on the requested resource
body: <p>I try to send request to an API in remote server. </p>
  
  <pre><code>  $.ajax({
                  type: "POST",
                  url: "http://myserverIPAddress/myAPIPath.aspx/FunctionName",
                  data: "{myID :7 }",            
                  contentType: "application/json; charset=utf-8;",
                  dataType: "json",
                  success: function (response) {
                      debugger;
  
                  },
                  error: function (response, res, r) {
  
                      debugger;
                  }
              });
  </code></pre>
  
  <p>the request fail and I get this error:</p>
  
  <p>Failed to load resource: the server responded with a status of 404 (Not Found)
  XMLHttpRequest cannot load <a href="http://myserverIPAddress/myAPIPath.aspx/FunctionName" rel="nofollow">http://myserverIPAddress/myAPIPath.aspx/FunctionName</a>. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://localhost:5316" rel="nofollow">http://localhost:5316</a>' is therefore not allowed access. The response had HTTP status code 404.</p>
  
  <p>Thank for help.</p>