title: IIS Expess 8 not sending Access-Control-Allow-Origin with VS2013 Dev
body: <p>I am using VS2013 with IIS8. My application accesses a server on a different IP to login. I had success doing the access from another Windows box running Webstorm. Now my app is running in VS2013 and I am getting this error:</p>
  
  <p>XMLHttpRequest cannot load <a href="http://example.com/Token" rel="nofollow">http://example.com/Token</a>. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<code>http://localhost:2757</code>' is therefore not allowed access. The response had HTTP status code 500.</p>
  
  <p>I have tried adding the following to my web config and also to the IIS Express Config file:</p>
  
  <p>web.config</p>
  
  <pre><code>  &lt;system.webServer&gt;
      &lt;httpProtocol&gt;
        &lt;customHeaders&gt;
          &lt;add name="Access-Control-Allow-Origin" value="*" /&gt;
          &lt;add name="Access-Control-Allow-Headers" value="Content-Type" /&gt;
        &lt;/customHeaders&gt;
      &lt;/httpProtocol&gt;
    &lt;/system.webServer&gt;
  </code></pre>
  
  <p>applicationhost.config</p>
  
  <pre><code>    &lt;httpProtocol&gt;
          &lt;customHeaders&gt;
              &lt;clear /&gt;
              &lt;add name="X-Powered-By" value="ASP.NET" /&gt;
              &lt;add name="Access-Control-Allow-Origin" value="*" /&gt;
              &lt;add name="Access-Control-Allow-Headers" value="Content-Type" /&gt;
          &lt;/customHeaders&gt;
          &lt;redirectHeaders&gt;
              &lt;clear /&gt;
          &lt;/redirectHeaders&gt;
      &lt;/httpProtocol&gt;
  </code></pre>
  
  <p>Still I am getting the same message.</p>
  
  <p>Does anyone have any ideas on how I can fix this. Also how can I tell if the Access-Control-Allow_Headers has been set by looking at Fiddler?</p>