Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you invoke FTP from ASP?

Status
Not open for further replies.

BigM

Programmer
Aug 30, 2000
39
GB
Hi

I have an ASP page which get built from reading a text file. However I need to automate the FTP of this file from a different server before it can be used.

I am OK with building a script file for automating FTP just dont know how to invoke FTP from ASP.

TIA [sig][/sig]
 
Hi Nick....I have written some VBScript which builds and FTP script which then creates Wscript.shell object. I then use this to call FTP. This works fine as a stand alone script running locally on my PC but invoked from the ASP it causes the WebServer to overload....any ideas?

CODE...............................

Dim strFTPFile ' this contains the FTP commands

strFTPFile = "Directory/Filename"

Set wsh = CreateObject("Wscript.Shell")
wsh.Run "c:\winnt\system32\ftp.exe -s:"&strFTPFile&" bmhp33.btm.bt.co.uk", intWindowStyle, True
[sig][/sig]
 
There are limitations regarding starting new processes and security from within IIS. When you're running a script from the desktop, everything is run under your login ID. When the web server is executing script, the user is the intenet user account(IUSR_machinename), which has limited permissions.

[sig]<p>nick bulka<br><a href=mailto: > </a><br><a href= </a><br>Get your technical books at Bulka's Books<br>
[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top