I have developed a set of apis that live on an asp.net mvc application, but will be consumed from a browser accessing our main site (which lives on a LAMP stack).
The domain names look like this:
API's
http://apis.www.mainsite.org (originally, apis.mainsite.org, but I made the modification in an attempt to fix the problem)
I make a $.ajax() request to the api which in turn sends plain html to dump an input form into a div.
The configration runs fine when I run from a sample host page that lives on my apis site, but when I put the same page on a site outside of apis.www.mainsite.org, I get a "permission denied" error in IE on the first request to the service.
I've seem a few resources that say I must implement JSONP in order to get this to work correctly and make the cross-domain script call that way - but I am hopeful that I can enable that functionality while still returning html instead of JSON.
Any suggestions would be greatly appreciated.
One other question - any idea why an XMLhttp request from http://mysite.org to http://api.mysite.org would be considered cross domain? Does any change in the domain name make it a cross domain call?
It seems like a fairly common scenario to separate the domain for the api from the main content domain and I am hopeful that I am just missing something simple.
Best regards and thanks for your time.
Hal