Does anybody know if its possible to transfer a file to another machine using FTP in my ASP page? I'm trying to re-write a VB6 application using ASP.NET. This app display a user input form and when the user clicks the submit button all the details from the
web form are written to a text file on the web server and then transferred to another machine via FTP. The VB6 app is using the wininet.dll api to do same. I'm looking for a simple solution so any guidelines or references would be much appreciated. Thanks
in advance
Writing an FTP component is not a simple exercise. So, the "simple" solution is to buy an FTP component. I bought
Rebex FTP for .NET. It is wonderfully simple to use. Download the trial version and see if it provides the functionality you need.
Why don't you check below link
http://www.dotnetbips.com/displayarticle.aspx?id=26 This is a free component! Also try in Gotdotnet samples. You will find many free ASPNET FTP comonents with source! Good luck!
Thanks guys. I'm in the process of trying out the the two components you mention. Problem is... I'm trasnferring to a mainframe machine running Open VMS. Not sure if these components are compatible or not. Only time will tell.
I've got a DLL called "FTPFactory.dll" that I found somewhere a few years ago, works fine with ASP.NET, some sample code of my usage of it:
Top of code behind:
Imports FtpLib
In the function or sub to do the FTP-ing:
Dim Client As FTPFactory = New FTPFactory
Client.setRemoteHost("The FTP server name or IP goes here")
Client.setRemoteUser("Login Username goes here")
Client.setRemotePass("Login Password goes here")
Client.login()
Client.setBinaryMode(True) 'Setsupload mode to binary
Some methods available (Intellisense helps with this stuff below)
.chdir 'Changes directory
.mkdir 'Creates a directory
.upload 'Uploads a file, make sure to use the *full* path
.renameRemoteFile
.close() 'Closes the connection
There's also methods for deleting and moving and other stuff
If you'd like it, just email me (my username @ my username . com) and I can shoot you over the assembly.... (just a forewarning, i think gmail will block the email even though its inside a zip since is a dll file, so provide a non-gmail addy)
"If you make it idiot proof, they'll build a better idiot"
bradyjp_1974
Member
225 Points
45 Posts
FTP Transfer in ASP.NET?
Nov 07, 2003 10:37 AM|LINK
SomeNewKid
All-Star
45894 Points
8027 Posts
Re: FTP Transfer in ASP.NET?
Nov 07, 2003 10:57 AM|LINK
SreedharK
All-Star
18571 Points
3119 Posts
MVP
Re: FTP Transfer in ASP.NET?
Nov 07, 2003 11:04 AM|LINK
http://www.w3coder.org
weblog http://weblogs.asp.net/skoganti
bradyjp_1974
Member
225 Points
45 Posts
Re: FTP Transfer in ASP.NET?
Nov 07, 2003 11:27 AM|LINK
bradyjp_1974
Member
225 Points
45 Posts
Re: FTP Transfer in ASP.NET?
Nov 07, 2003 12:29 PM|LINK
naceau
Member
15 Points
3 Posts
Re: FTP Transfer in ASP.NET?
Apr 11, 2006 12:06 PM|LINK
An other approach is to use VisualPaseo, a freeware that provide Graphical interface to configure component like FTP.
Ftp wizards published are FTP wininet, Catalist and command mode. They all provide the initial account for mainframe connection.
Download: ViualPaseo Community Edition
Find out more : http://www.paseosoft.com
MorningZ
Star
8849 Points
1822 Posts
Re: FTP Transfer in ASP.NET?
Apr 11, 2006 12:56 PM|LINK
I've got a DLL called "FTPFactory.dll" that I found somewhere a few years ago, works fine with ASP.NET, some sample code of my usage of it:
Top of code behind:
Imports FtpLib
In the function or sub to do the FTP-ing:
Dim Client As FTPFactory = New FTPFactory
Client.setRemoteHost("The FTP server name or IP goes here")
Client.setRemoteUser("Login Username goes here")
Client.setRemotePass("Login Password goes here")
Client.login()
Client.setBinaryMode(True) 'Setsupload mode to binary
Some methods available (Intellisense helps with this stuff below)
.chdir 'Changes directory
.mkdir 'Creates a directory
.upload 'Uploads a file, make sure to use the *full* path
.renameRemoteFile
.close() 'Closes the connection
There's also methods for deleting and moving and other stuff
If you'd like it, just email me (my username @ my username . com) and I can shoot you over the assembly.... (just a forewarning, i think gmail will block the email even though its inside a zip since is a dll file, so provide a non-gmail addy)
obinna123
Participant
983 Points
213 Posts
Re: FTP Transfer in ASP.NET?
Oct 29, 2008 01:53 PM|LINK
qwe123kids
All-Star
48619 Points
7957 Posts
MVP
Re: FTP Transfer in ASP.NET?
May 25, 2009 12:00 PM|LINK
Hi,
http://www.devasp.net/net/articles/display/280.html
http://www.codeguru.com/csharp/.net/net_security/authentication/article.php/c15051
http://www.15seconds.com/issue/080327.htm
http://geekswithblogs.net/mikeymac/archive/2006/03/10/71990.aspx
check the above link Contain Asp.net 2.0 Ftp Support..code
Avinash Tiwari
Remember to click “Mark as Answer” on the post, if it helps you.
ashish-1983
Contributor
4879 Points
1257 Posts
Re: FTP Transfer in ASP.NET?
Sep 15, 2009 09:11 AM|LINK
http://www.codeguru.com/csharp/csharp/cs_internet/desktopapplications/article.php/c13163
http://www.csharphelp.com/archives/archive219.html
http://aspalliance.com/1187_Building_a_Simple_FTP_Application_Using_C_20.all
http://msdn.microsoft.com/en-us/library/ms229715.aspx
Gridview
Jquery
Asp.net
Fun !