472,354 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,354 software developers and data experts.

Get File from FTP Server - ServerXMLHTTP

<%
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:pa******@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!

Jan 3 '07 #1
5 6784
Why would you think that it is allowed to mix http and ftp protocols ?


"SPRFRKR" <su**********@gmail.comwrote in message news:11**********************@a3g2000cwd.googlegro ups.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:pa******@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!

Jan 3 '07 #2

"SPRFRKR" <su**********@gmail.comwrote in message
news:11**********************@a3g2000cwd.googlegro ups.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:pa******@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!

Jan 3 '07 #3

"Jon Paal" <Jon nospam Paal @ everywhere dot comwrote in message
news:12*************@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.

Jan 3 '07 #4
you can't mix protocols.
"Anthony Jones" <An*@yadayadayada.comwrote in message news:%2****************@TK2MSFTNGP03.phx.gbl...
>
"Jon Paal" <Jon nospam Paal @ everywhere dot comwrote in message
news:12*************@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.

Jan 3 '07 #5
>
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...

"Jon Paal" <Jon nospam Paal @ everywhere dot comwrote in message
news:12*************@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" <Jon nospam Paal @ everywhere dot comwrote in message
news:12*************@corp.supernews.com...
you can't mix protocols.
What do you mean by 'mix protocols'?

Jan 3 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: garbagecatcher | last post by:
Hello, here's my problem: On my web server I generate a file, I need to send this file to a different web server. I have no control over the other web server. The only way they accept...
3
by: Dan Sikorsky | last post by:
Uploading from browser to server using Msxml2.XMLHTTP takes a long time about 15 minutes for a 1.5MB file at 37.2Kbps, although it does get there. Is there anyway to speed things up? here's the...
2
by: Konstantin Mironov | last post by:
Hi all! We have the corporate website based on MS IIS 5.0. There's an ASP page for our customers with the hyperlinks to downloadable files that are hosted on external web server (in order to...
4
by: Sasha | last post by:
Hi, I need to send xml file to an asp page.. I have no idea how to do it... I only know that I need to do HTTPRequest Post... Could someone help? Maybe there are some examples on the Web? ...
1
by: Raúl Martín | last post by:
I´ve a function in asp that run correctly but If I tried to change it forasp.net in asp: xmlHTTP = CreateObject("Microsoft.XMLHTTP") And I thought to use this sentence for asp.net but the...
4
by: Dave H | last post by:
I want to use XMLHTTP or something like it from my server code. I'm trying to call a web page, and I want the results back into a string. ideas? Thanks, Dave
0
by: Leilamir | last post by:
Hi there, We are having a problem with the following code. This asp page (as you can see in the code) creates a ServerXMLHTTP object and posts an xml object (xmlRequest) to another asp page and...
18
by: Thomas Lunsford | last post by:
I have inherited a set of asp pages that I now need to augment. In order to minimize changes to production code, I would like to make a "call" to an asp page from a new asp page. Existing code is...
6
by: BarryX | last post by:
Hi, How do I simulate this from the server side: <form name="SearchForm" method="POST" id="SearchForm" action="http://SOMEURL/Search.ASP?Parm1=1&Parm2=2"> I have generally been posting data...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made but the http to https rule only works for...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.