Get File from FTP Server - ServerXMLHTTP

Get File from FTP Server - ServerXMLHTTP

am 03.01.2007 01:40:05 von SPRFRKR

<%
Response.Buffer = True
Set objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
'objHTTP.open "GET","ftp://xxx.xxx.xx.xxx/xxx.mp3", false, "username",
"password"
objHTTP.open "GET","ftp://username:password@xxx.xxx.xx.xxx/xxx.mp3",
false
objHTTP.send

Response.ContentType = "application/octet-stream"
Response.BinaryWrite ObjHTTP.responseBody
%>

Any ideas why the above code does not let me access the file on the FTP
server? Neither method to authentcate seems to work. Also tried "OPEN"
but I don't think that worked either.

Thanks!

Re: Get File from FTP Server - ServerXMLHTTP

am 03.01.2007 05:51:56 von Jon Paal

Why would you think that it is allowed to mix http and ftp protocols ?




"SPRFRKR" wrote in message news:1167784805.451638.178530@a3g2000cwd.googlegroups.com...
> <%
> Response.Buffer = True
> Set objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
> 'objHTTP.open "GET","ftp://xxx.xxx.xx.xxx/xxx.mp3", false, "username",
> "password"
> objHTTP.open "GET","ftp://username:password@xxx.xxx.xx.xxx/xxx.mp3",
> false
> objHTTP.send
>
> Response.ContentType = "application/octet-stream"
> Response.BinaryWrite ObjHTTP.responseBody
> %>
>
> Any ideas why the above code does not let me access the file on the FTP
> server? Neither method to authentcate seems to work. Also tried "OPEN"
> but I don't think that worked either.
>
> Thanks!
>

Re: Get File from FTP Server - ServerXMLHTTP

am 03.01.2007 16:17:09 von Anthony Jones

"SPRFRKR" wrote in message
news:1167784805.451638.178530@a3g2000cwd.googlegroups.com...
> <%
> Response.Buffer = True
> Set objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
> 'objHTTP.open "GET","ftp://xxx.xxx.xx.xxx/xxx.mp3", false, "username",
> "password"
> objHTTP.open "GET","ftp://username:password@xxx.xxx.xx.xxx/xxx.mp3",
> false
> objHTTP.send
>
> Response.ContentType = "application/octet-stream"
> Response.BinaryWrite ObjHTTP.responseBody
> %>
>
> Any ideas why the above code does not let me access the file on the FTP
> server? Neither method to authentcate seems to work. Also tried "OPEN"
> but I don't think that worked either.

ServerXMLHTTP being based on WinHTTP is limited strictly to HTTP protocol
(and HTTPS) only.


>
> Thanks!
>

Re: Get File from FTP Server - ServerXMLHTTP

am 03.01.2007 16:20:05 von Anthony Jones

"Jon Paal" wrote in message
news:12pmdhcb9bptk41@corp.supernews.com...
> Why would you think that it is allowed to mix http and ftp protocols ?
>

Because this sort of thing would work using MSXML2.XMLHTTP object.

Re: Get File from FTP Server - ServerXMLHTTP

am 03.01.2007 17:25:36 von Jon Paal

you can't mix protocols.


"Anthony Jones" wrote in message news:%23fQ3mq0LHHA.1240@TK2MSFTNGP03.phx.gbl...
>
> "Jon Paal" wrote in message
> news:12pmdhcb9bptk41@corp.supernews.com...
>> Why would you think that it is allowed to mix http and ftp protocols ?
>>
>
> Because this sort of thing would work using MSXML2.XMLHTTP object.
>
>
>

Re: Get File from FTP Server - ServerXMLHTTP

am 03.01.2007 17:53:27 von Anthony Jones

>
> "Anthony Jones" wrote in message
news:%23fQ3mq0LHHA.1240@TK2MSFTNGP03.phx.gbl...
> >
> > "Jon Paal" wrote in message
> > news:12pmdhcb9bptk41@corp.supernews.com...
> >> Why would you think that it is allowed to mix http and ftp protocols ?
> >>
> >
> > Because this sort of thing would work using MSXML2.XMLHTTP object.
> >
>
> "Jon Paal" wrote in message
news:12pnm60g6l71k0f@corp.supernews.com...
> you can't mix protocols.
>

What do you mean by 'mix protocols'?