I created an asp.net mvc website which, among other uses, exposes some json to the public. Now I received the request to add the
"Access-Control-Allow-Origin"
header to allow an external XMLHttpRequest to fulfill it's work.
I added on the web-config:
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="http://www.kkk.com"/>
</customHeaders>
</httpProtocol>
</system.webServer>
But it doesn't show up when I verify on firebug or websniffer. During the debug on IIS express it works like a charm.
I'm using VS2013, mvc updated to the last nuget package.
The site is hosted under another website as application, using .net 4 dynamic app pool. (so it is http://api.example.com/io/controlleraction)