Posted on : 2012-11-23 01:19:16

Configure cross-origin resource sharing in IIS 6 and 7

For IIS6To CORS-enable Microsoft IIS6, perform the following steps:

  1. Open Internet Information Service (IIS) Manager
  2. Right click the site you want to enable CORS for and go to Properties
  3. Change to the HTTP Headers tab
  4. In the Custom HTTP headers section, click Add
  5. Enter Access-Control-Allow-Origin as the header name
  6. Enter * as the header value
  7. Click Ok twice
For IIS7For Microsoft IIS7, merge this into the web.config file at the root of your application or site:<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> </customHeaders> </httpProtocol> </system.webServer> </configuration>If you don't have a web.config file already, or don't know what one is, just create a new file called web.config containing the snippet above.

Leave a comment

Please login to leave your comment.

Published in

, , ,
Share on Facebook Share on Twitter Share on tumblr

Language: English(US) Copyright © 2014 by SozialPapier. Verison: 1.0.5 Beta

All Rights Reserved.