title: CORS 405 (Method Not Allowed)
body: <p>i intend to send a cross-domain request to a soap web service using Ajax
  The url of the web service is: <a href="http://example1.asmx?op=GetVOD" rel="nofollow">http://example1.asmx?op=GetVOD</a></p>
  
  <p>My code:</p>
  
  <pre><code>var url = 'http://example1.asmx?op=GetVOD';
  var xhr = new XMLHttpRequest();
  var strRequest = "&lt;?xml version='1.0' encoding='utf-8'?&gt;" +
  "&lt;soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'&gt;" +
    "&lt;soap:Body&gt;" +
      "&lt;getVODTypeList xmlns='http://tv21.com/' /&gt;" + 
    "&lt;/soap:Body&gt;" +
  "&lt;/soap:Envelope&gt;"
  xhr.open('POST', url, true);
  xhr.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
  xhr.setRequestHeader("SOAPAction", "http://tv21.com/getVOD");
  xhr.send(strRequest);
  </code></pre>
  
  <p>On the IIS 7 server side, i've already add these lines to the file web.config</p>
  
  <pre><code>&lt;add name="Access-Control-Allow-Origin" value="*" /&gt;
  &lt;add name="Access-Control-Allow-Methods" value="GET,PUT,POST,DELETE,OPTIONS" /&gt;
  &lt;add name="Access-Control-Allow-Headers" value="Content-Type" /&gt;
  </code></pre>
  
  <p>when i run the client code on Chrome, i have an 405 error: </p>
  
  <pre><code>http://example1.asmx?op=GetVOD 405 (Method Not Allowed)
  http://example1.asmx?op=GetVOD Invalid HTTP status code 405
  </code></pre>
  
  <p>Does anyone know how to solve this ?</p>
  
  <p>Thank in advance</p>