Hello guys.
As the title says, I'm getting an error using the API with IE9 and AngularJS; getting an 'Access is denied'-error. This is my error message in the console:
[object Error]{description: "Access is denied", message: "Access is denied", name: "Error", number: -2147024891}
Any solutions or work-around I can do?
Thanks in regards.
찾으시는 영화나 TV 프로그램이 없나요? 로그인 하셔서 직접 만들어주세요.
이 항목을 평가하거나 목록에 추가할까요?
회원이 아닌가요?
Travis Bell님의 댓글
6월 3, 2015 at 10:17 오전
Hi aventic,
We might need more info as I have never heard from anyone else about this error. So it's only IE9, other browsers are fine? Are you using JSONP?
Can you post a snippet of code showing the error? I am fairly positive the "Access is denied" is not our error (ie. not an API error), it sounds like this is something Angular is kicking back.
aventic님의 댓글
6월 3, 2015 at 12:51 오후
Here's a short snippet, as to where I'm getting the error from.
Yes it's only IE9 (I dont know about IE8 and below tho) other browsers are fine. It might be Angular causing this error, but I'm curious as to why, and if others have seen same error?
Here is a stackoverflow issue about it, but not really a solution I can use in this case: http://stackoverflow.com/questions/26304245/ie9-ie8-with-amgularjs-cors-returns-access-is-denied-asp-net-webapi
Travis Bell님의 댓글
6월 3, 2015 at 1:10 오후
I believe switching to use JSONP will fix this, won't it?
aventic님의 댓글
6월 3, 2015 at 1:23 오후
Then I might be unaware on how to make the switch. :)
Is throwing another error with 'semicolon was expected'
Travis Bell님의 댓글
6월 3, 2015 at 1:29 오후
No worries, you just need to add a
callback
param. Usually libraries have an option to specify this, if Angular doesn't, try adding one like this:Cheers.
aventic님의 댓글
6월 3, 2015 at 1:41 오후
Aha this works very well, thanks!
This really helped me.
Found some documentation on Angulars jsonp: https://docs.angularjs.org/api/ng/service/$http#jsonp
This is what I'm using in my code now:
Travis Bell님의 댓글
6월 3, 2015 at 3:25 오후
No problem, glad I could help :D