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 Rhinorhino 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
Joined
Aug 30, 2000
Messages
39
Location
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]
 
you'll need a COM-compatible FTP component to do this. You can probably find one at one of the freeware/shareware repositories, or you can create your own in VB [sig]<p>nick bulka<br><a href=mailto: > </a><br><a href= </a><br>Get your technical books at Bulka's Books<br>
[/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 = &quot;Directory/Filename&quot;

Set wsh = CreateObject(&quot;Wscript.Shell&quot;)
wsh.Run &quot;c:\winnt\system32\ftp.exe -s:&quot;&strFTPFile&&quot; bmhp33.btm.bt.co.uk&quot;, 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