1

I have an angularjs application that runs in a webview that is meant for a Windows Surface device (I am also using IE 11 instead of Adobe AIR webkit).

I want to load a local XML file from the app and I am using $http.get() for that.

The request is rejected with an Access is denied message.

I have tried using jQuery, Ajax and even XMLHttpRequest(); / XDomainRequest()but all throw the same error.

Looks like IE has cross domain issues for HTTP requests.

The HTTP get requests works well even on Mobile devices but is a real pain on IE :(

Is there any way to programmatically circumvent the additional security imposed by IE?

Your inputs are much appreciated.

PPS
  • 31
  • 7
  • I finally got around this issue by starting a HTTP server via Adobe Air sockets and hosting my local XML on it. So by calling a $http.get() in javascript with a url: `http://localhost: /localFile.xml` I was able to get past the cross domain restrictions. – PPS May 19 '15 at 08:13

1 Answers1

0

I resolved the issue by starting a local http server and hosting my xml files on it. This way the http get request had a url of the form http://localhost:<port>/myLocalFile.xml and got around the cross domain issues. This worked perfectly for me!

Thanks to the contributors of the links below - your suggestions helped me! http://answers.playcanvas.com/questions/833/cannot-load-model-due-to-cross-origin-request-being-blocked

XMLHttpRequest cannot load file. Cross origin requests are only supported for HTTP

Community
  • 1
  • 1
PPS
  • 31
  • 7