I'm posting data from our main server (www.mysite.com) to a page on another server (xyz.mysite.com). I can perform a GET call just fine but when doing a POST I get this error:
XMLHttpRequest cannot load http://xyz.oldi.com/mypage.aspx. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.mysite.com' is therefore not allowed access.
The HttpRequest is setup like this:
req.open('post', url, true);
And I add a header in ASP like this:
But I'm still getting the origin error. What components could I be missing? Thanks!