Response to Preflight responded with 405 Error code : Angular JS
<p>I am using an API call in cross domain where In chrome I am getting this response . I have all the headers included in my REST API in other domain . </p>

<pre><code>  &lt;add name="Access-Control-Allow-Origin" value="*"/&gt;
        &lt;add name="X-Content-Type-Options" value="nosniff"/&gt;
        &lt;add name="X-XSS-Protection" value="1;"/&gt;
        &lt;remove name="X-Powered-By"/&gt;
        &lt;add name="Access-Control-Allow-Headers" value="Origin, X-Requested-With, Content-Type, Accept"/&gt;
        &lt;add name="Access-Control-Allow-Methods" value="POST,GET"/&gt;
</code></pre>

<p>And this is my API Call from angular . </p>

<pre><code>$scope.XYZ=customURLWithoutArray.save({
         controller:"XYZController",
            actionName:"ABCACTIONNAME",
             UserId: "VC"
         },
            function($success){

       return $success;
              },function($error){
      return $error;
    });    
</code></pre>

<p>It is able to hit the controller but data is null.</p>