The Movie Database 지원

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.

7 댓글 (1 / 1)

Jump to last post

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.

Here's a short snippet, as to where I'm getting the error from.

$http.get('https://api.themoviedb.org/3/search/tv' + api_key + '&query=' + serieName);

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

I believe switching to use JSONP will fix this, won't it?

Then I might be unaware on how to make the switch. :)

$http.jsonp('https://api.themoviedb.org/3/search/tv' + api_key + '&query=' + serieName);

Is throwing another error with 'semicolon was expected'

Then I might be unaware on how to make the switch. :)

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:

$http.jsonp('https://api.themoviedb.org/3/search/tv' + api_key + '&query=' + serieName + '&callback=test');

Cheers.

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:

$http.jsonp('https://api.themoviedb.org/3/search/tv' + api_key + '&query=' + serieName + '&callback=JSON_CALLBACK');

No problem, glad I could help :D

찾으시는 영화나 TV 프로그램이 없나요? 로그인 하셔서 직접 만들어주세요.

전체

s 검색 바 띄우기
p 프로필 메뉴 열기
esc 열린 창 닫기
? 키보드 단축키 창 열기

미디어 페이지

b 돌아가기
e 편집 페이지로 이동

TV 시즌 페이지

(우 화살표) 다음 시즌으로 가기
(좌 화살표) 이전 시즌으로 가기

TV 에피소드 페이지

(우 화살표) 다음 에피소드로 가기
(좌 화살표) 이전 에피소드로 가기

모든 이미지 페이지

a 이미지 추가 창 열기

모든 편집 페이지

t 번역 선택 열기
ctrl+ s 항목 저장

토론 페이지

n 새 토론 만들기
w 보기 상태
p 공개/비공개 전환
c 열기/닫기 전환
a 활동 열기
r 댓글에 글쓰기
l 마지막 댓글로 가기
ctrl+ enter 회원님의 메세지 제출
(우 화살표) 다음 페이지
(좌 화살표) 이전 페이지

설정

이 항목을 평가하거나 목록에 추가할까요?

로그인