access denied when using winjs.xhr for ftp

0

I am writing some code for windows 8 that uses open data provided by the city of Vancouver. When I use the WinJS.xhr call on the data url:

ftp://webftp.vancouver.ca/opendata/csv/weekendplayfieldstatus.csv

I get the exception:

0x80070005 - JavaScript runtime error: Access is denied.

Here is the function call:

var url = ftp://webftp.vancouver.ca/opendata/csv/weekendplayfieldstatus.csv;
return WinJS.xhr({ url: url });

However, the very same call works for pretty much every other website I have tried. But, the rest have all been http and not ftp.

http
ftp
xmlhttprequest
winjs
asked on Stack Overflow Aug 13, 2013 by brad bgi • edited Jul 7, 2020 by pppery

2 Answers

0

IE's XMLHttpRequest object (which WinJS.xhr uses) doesn't support ftp protocol so that's why you get an error.

Try using BackgroundDownloader class which supports ftp downloads.

answered on Stack Overflow Aug 13, 2013 by Tadeusz Wójcik • edited Aug 14, 2013 by Tadeusz Wójcik
0

The XHR acronym stands for "XML HTTP Request". The protocol it supports is in the name.

answered on Stack Overflow Aug 13, 2013 by idbehold

User contributions licensed under CC BY-SA 3.0