title: CORS settings for IIS 7.5
body: <p>How can I convert the following code for use in the web.config in IIS 7.5 and where in the web.config file I should place each piece of code?</p>
  <pre><code># Always set these headers.
  Header always set Access-Control-Allow-Origin &quot;*&quot;
  Header always set Access-Control-Allow-Methods &quot;POST, GET, OPTIONS, DELETE, PUT&quot;
  Header always set Access-Control-Max-Age &quot;1000&quot;
  Header always set Access-Control-Allow-Headers &quot;x-requested-with, Content-Type, origin, authorization, accept, client-security-token&quot;
   
  # Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request.
  RewriteEngine On
  RewriteCond %{REQUEST_METHOD} OPTIONS
  RewriteRule ^(.*)$ $1 [R=200,L]
  </code></pre>