By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,871 Members | 2,418 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,871 IT Pros & Developers. It's quick & easy.

How to transfer files via FTP under .net?

P: n/a
Hi,

How can I transfer files via FTP under asp.net? Don't found any info...

thanks,
Lacka
Nov 19 '05 #1
Share this Question
Share on Google+
16 Replies


P: n/a
Hi,

Lots of examples here:

http://www.gotdotnet.com/community/u...aspx?query=ftp

Ken
Microsoft MVP [ASP.NET]

"Lacka" <ke************@inia-solutions.hu> wrote in message
news:ur******************@TK2MSFTNGP15.phx.gbl...
Hi,

How can I transfer files via FTP under asp.net? Don't found any info...

thanks,
Lacka


Nov 19 '05 #2

P: n/a
Thanks!
Lots of examples here:

Nov 19 '05 #3

P: n/a
Hi Lacka,

Be warned: FTP is a notoriously unreliable protocol, and the examples you
will see are only the bare bones of what you will need to create a robust
FTP client. You will have to handle almost every conceivable type of FTP
transfer error that there is, and there are quite a few.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Lacka" <ke************@inia-solutions.hu> wrote in message
news:eI****************@TK2MSFTNGP11.phx.gbl...
Thanks!
Lots of examples here:


Nov 19 '05 #4

P: n/a
Hi Kevin,

I don't want to write an FTP client - I just want to upload a file to
somewhere. Like sending a mail - uploading a file. When unsuccessful, I need
to log the error (just "upload unsuccessful"), and don't want to do further
tasks. Therefore looking for a simple FTP uploader solution, that can use
under asp.net - say from a webservice.
Be warned: FTP is a notoriously unreliable protocol, and the examples you
will see are only the bare bones of what you will need to create a robust
FTP client. You will have to handle almost every conceivable type of FTP
transfer error that there is, and there are quite a few.

Nov 19 '05 #5

P: n/a
> I don't want to write an FTP client - I just want to upload a file to
somewhere. Like sending a mail - uploading a file. When unsuccessful, I
need
to log the error (just "upload unsuccessful"), and don't want to do
further
tasks. Therefore looking for a simple FTP uploader solution, that can use
under asp.net - say from a webservice.
Uploading a file somewher via FTP, means you need to write an FTP client.
There are only 2 entities in an FTP session: Client and server. Which one
are you planning to write? Hint: The answer is "FTP client."

Now, if you write an FTP client that connects to an FTP server, and attempts
to upload a file, pay attention to my warnings! There is no such thing as "a
simple FTP uploader (read 'client') solution." The basic protocol is about
as simple as they get. Handling dropped packets and other FTP issues is not.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Lacka" <ke************@inia-solutions.hu> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl... Hi Kevin,

I don't want to write an FTP client - I just want to upload a file to
somewhere. Like sending a mail - uploading a file. When unsuccessful, I
need
to log the error (just "upload unsuccessful"), and don't want to do
further
tasks. Therefore looking for a simple FTP uploader solution, that can use
under asp.net - say from a webservice.
Be warned: FTP is a notoriously unreliable protocol, and the examples you
will see are only the bare bones of what you will need to create a robust
FTP client. You will have to handle almost every conceivable type of FTP
transfer error that there is, and there are quite a few.


Nov 19 '05 #6

P: n/a
Ok, understand.

I have downloaded some components from gotdotnet (thanks for Ken), but I
don't know what to do then? Can you or anybody explain, where to copy the
files of the downloaded component, and how to use it in an aspx file? I
never installed .net components yet, so for me don't say nothing the
filename *.vb, *.sln, *.suo, *.vbproj, etc... Some exaples are on the
gotdotnet site, but no words about installation. I use WebMatrix to create
the aspx files.

Here are the list of files downloaded:

Component #1
---------------
AssemblyInfo.vb
clsFTP.vb
FTP.sln
FTP.suo
FTP.vbproj
FTP.vbproj.user
bin\FTP.dll
FTP.pdb
Component #2
---------------
AssemblyInfo.cs
FtpConnection.cs
FtpException.cs
FtpStream.cs
FtpSupport.csproj
FtpSupport.csproj.user
FtpSupport.sln
FtpSupport.suo
NativeMethods.cs

thanks
Nov 19 '05 #7

P: n/a
Hi Lacka,

WebMatrix, eh? Well, I'm out. You're going to have to create a scripted
class using Web Matrix, and I have never used it, or scripted classes. I'm a
VS.Net guy. Love them DLLs.

Another alternative would be to shell out a few bucks for a commercial .Net
FTP client. There are several at least out there in Google-Land.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Lacka" <ke************@inia-solutions.hu> wrote in message
news:u4****************@TK2MSFTNGP11.phx.gbl...
Ok, understand.

I have downloaded some components from gotdotnet (thanks for Ken), but I
don't know what to do then? Can you or anybody explain, where to copy the
files of the downloaded component, and how to use it in an aspx file? I
never installed .net components yet, so for me don't say nothing the
filename *.vb, *.sln, *.suo, *.vbproj, etc... Some exaples are on the
gotdotnet site, but no words about installation. I use WebMatrix to create
the aspx files.

Here are the list of files downloaded:

Component #1
---------------
AssemblyInfo.vb
clsFTP.vb
FTP.sln
FTP.suo
FTP.vbproj
FTP.vbproj.user
bin\FTP.dll
FTP.pdb
Component #2
---------------
AssemblyInfo.cs
FtpConnection.cs
FtpException.cs
FtpStream.cs
FtpSupport.csproj
FtpSupport.csproj.user
FtpSupport.sln
FtpSupport.suo
NativeMethods.cs

thanks

Nov 19 '05 #8

P: n/a
I feel that our FTP Library is the best designed on the market. It
even supports Secure FTP.

You'll be sending/receiving files with only one line of code.

http://www.xceedsoft.com/products/FtpNet

And for the same price as other commercial FTP libraries, at Xceed you
get the entire Data Manipulation suite (includes the bestselling Xceed
Zip for .NET, for example).

On Thu, 13 Jan 2005 12:35:33 -0500, "Kevin Spencer"
<ke***@DIESPAMMERSDIEtakempis.com> wrote:
Hi Lacka,

WebMatrix, eh? Well, I'm out. You're going to have to create a scripted
class using Web Matrix, and I have never used it, or scripted classes. I'm a
VS.Net guy. Love them DLLs.

Another alternative would be to shell out a few bucks for a commercial .Net
FTP client. There are several at least out there in Google-Land.


--
Alex Leblanc
Xceed Software Inc.
http://www.xceedsoft.com

Check out our advanced .NET grid and SmartUI controls

Email: xL*******@xceedsoft.com (remove the first 'x')
Nov 19 '05 #9

P: n/a
Your products are priced nicely too (and no, I never have worked for XCeed).

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"AlexL [Xceed]" <xL*******@xceedsoft.com> wrote in message
news:f5********************************@4ax.com...
I feel that our FTP Library is the best designed on the market. It
even supports Secure FTP.

You'll be sending/receiving files with only one line of code.

http://www.xceedsoft.com/products/FtpNet

And for the same price as other commercial FTP libraries, at Xceed you
get the entire Data Manipulation suite (includes the bestselling Xceed
Zip for .NET, for example).

On Thu, 13 Jan 2005 12:35:33 -0500, "Kevin Spencer"
<ke***@DIESPAMMERSDIEtakempis.com> wrote:
Hi Lacka,

WebMatrix, eh? Well, I'm out. You're going to have to create a scripted
class using Web Matrix, and I have never used it, or scripted classes. I'm
a
VS.Net guy. Love them DLLs.

Another alternative would be to shell out a few bucks for a commercial
.Net
FTP client. There are several at least out there in Google-Land.


--
Alex Leblanc
Xceed Software Inc.
http://www.xceedsoft.com

Check out our advanced .NET grid and SmartUI controls

Email: xL*******@xceedsoft.com (remove the first 'x')

Nov 19 '05 #10

P: n/a
The only comment I have about that is that they're
probably "priced nicely" for the US market.

For many 2nd and 3rd world markets,
their price is prohibitive, and will encourage pirating.

It has been my long-standing viewpoint that software producers
in more-developed countries ( like the US, UK, Australia, Spain,
etc. ) should have lower pricing scales for less-developed markets.

Not scaling down prices so that developers in less-developed
countries which can't compete economically, because their
countris have less-devoped economies, only leads to more
pirating of software useful for developers.

I don't see a reason to peg high prices on software
which is bought by less-developed countries.

At the, comparatively, high prices which are normal for
more-developed countries, the market is close to nil
in less-developed countries.

Making developer software accessible at lower prices in
less-developed countries doesn't equate to a revenue loss
for the companies who make developer software.

It only serves as a stimulus for more revenue when
the economies of those countries upscales.

Setting lower prices for software shipped to less-developed
countries will actually increase revenue for software developers.


Juan T. Llibre
ASP.NET MVP
===========
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:uG**************@TK2MSFTNGP10.phx.gbl...
Your products are priced nicely too (and no, I never have worked for
XCeed).

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.

"AlexL [Xceed]" <xL*******@xceedsoft.com> wrote in message
news:f5********************************@4ax.com...
I feel that our FTP Library is the best designed on the market. It
even supports Secure FTP.

You'll be sending/receiving files with only one line of code.

http://www.xceedsoft.com/products/FtpNet

And for the same price as other commercial FTP libraries, at Xceed you
get the entire Data Manipulation suite (includes the bestselling Xceed
Zip for .NET, for example).

On Thu, 13 Jan 2005 12:35:33 -0500, "Kevin Spencer"
<ke***@DIESPAMMERSDIEtakempis.com> wrote:
Hi Lacka,

WebMatrix, eh? Well, I'm out. You're going to have to create a scripted
class using Web Matrix, and I have never used it, or scripted classes.
I'm a
VS.Net guy. Love them DLLs.

Another alternative would be to shell out a few bucks for a commercial
.Net
FTP client. There are several at least out there in Google-Land.


--
Alex Leblanc
Xceed Software Inc.
http://www.xceedsoft.com

Check out our advanced .NET grid and SmartUI controls

Email: xL*******@xceedsoft.com (remove the first 'x')


Nov 19 '05 #11

P: n/a
Interesting. I suppose it is conceivable to show different pricing for
products (as well as different currency) depending on the country of
origin of the visitor to a web site. I'd wager it is being done
already. It would have to be done carefully, though, so as not to
complicate things for sales staff. Example... When asked about pricing
by telephone, one would have to make sure to know the country of
origin first.

On Mon, 17 Jan 2005 12:41:44 -0400, "Juan T. Llibre"
<no***********@nowhere.com> wrote:
The only comment I have about that is that they're
probably "priced nicely" for the US market.

For many 2nd and 3rd world markets,
their price is prohibitive, and will encourage pirating.

It has been my long-standing viewpoint that software producers
in more-developed countries ( like the US, UK, Australia, Spain,
etc. ) should have lower pricing scales for less-developed markets.

Not scaling down prices so that developers in less-developed
countries which can't compete economically, because their
countris have less-devoped economies, only leads to more
pirating of software useful for developers.

I don't see a reason to peg high prices on software
which is bought by less-developed countries.

At the, comparatively, high prices which are normal for
more-developed countries, the market is close to nil
in less-developed countries.

Making developer software accessible at lower prices in
less-developed countries doesn't equate to a revenue loss
for the companies who make developer software.

It only serves as a stimulus for more revenue when
the economies of those countries upscales.

Setting lower prices for software shipped to less-developed
countries will actually increase revenue for software developers.


Juan T. Llibre
ASP.NET MVP
===========
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:uG**************@TK2MSFTNGP10.phx.gbl...
Your products are priced nicely too (and no, I never have worked for
XCeed).

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.

"AlexL [Xceed]" <xL*******@xceedsoft.com> wrote in message
news:f5********************************@4ax.com...
I feel that our FTP Library is the best designed on the market. It
even supports Secure FTP.

You'll be sending/receiving files with only one line of code.

http://www.xceedsoft.com/products/FtpNet

And for the same price as other commercial FTP libraries, at Xceed you
get the entire Data Manipulation suite (includes the bestselling Xceed
Zip for .NET, for example).

On Thu, 13 Jan 2005 12:35:33 -0500, "Kevin Spencer"
<ke***@DIESPAMMERSDIEtakempis.com> wrote:

Hi Lacka,

WebMatrix, eh? Well, I'm out. You're going to have to create a scripted
class using Web Matrix, and I have never used it, or scripted classes.
I'm a
VS.Net guy. Love them DLLs.

Another alternative would be to shell out a few bucks for a commercial
.Net
FTP client. There are several at least out there in Google-Land.

--
Alex Leblanc
Xceed Software Inc.
http://www.xceedsoft.com

Check out our advanced .NET grid and SmartUI controls

Email: xL*******@xceedsoft.com (remove the first 'x')



--
Alex Leblanc
Xceed Software Inc.
http://www.xceedsoft.com

Check out our advanced .NET grid and SmartUI controls

Email: xL*******@xceedsoft.com (remove the first 'x')
Nov 19 '05 #12

P: n/a

I too am looking for an FTP solution for asp.net, I do not wish to
purchase a third party solution. I cannot use HTTPfilkeTransfer as the
files may be 2 Gigs or more in size, would consume too much memory.

The sample page is down, are those examples anywhere else? Does anyone
know of an alternative to FTP for uploading very large files from an
asp.net page?

Thanks

Bob
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #13

P: n/a
> The sample page is down, are those examples anywhere else? Does anyone
know of an alternative to FTP for uploading very large files from an
asp.net page?
HTTP? It's much more reliable, and if you plan on writing your own FTP
client, you're in for a lot of trouble. FTP is very unreliable, and prone to
errors. You have to handle them all.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"rpress" <rp****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I too am looking for an FTP solution for asp.net, I do not wish to
purchase a third party solution. I cannot use HTTPfilkeTransfer as the
files may be 2 Gigs or more in size, would consume too much memory.

The sample page is down, are those examples anywhere else? Does anyone
know of an alternative to FTP for uploading very large files from an
asp.net page?

Thanks

Bob
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 19 '05 #14

P: n/a


HTTP would be fine if not for the file size limitations - Microsoft
says:Theoretically, the maximum file upload size is fairly large.
However, because of ASP.NET health monitoring, you cannot upload very
large files in ASP.NET. The ASP.NET worker process has a virtual address
space of 2 gigabytes (GB). However, the ASP.NET worker process only uses
a little more than 1 GB because of health monitoring and memory
fragmentation.

During the upload process, ASP.NET loads the whole file in memory before
the user can save the file to the disk. Therefore, the process may
recycle because of the memoryLimit attribute of the processModel tag in
the Machine.config file. The memoryLimit attribute specifies the
percentage of physical memory that the ASP.NET worker process can
exhaust before the process is automatically recycled. Recycling prevents
memory leaks from causing ASP.NET to crash or to stop responding.

Additionally, other factors play a role in the maximum file size that
can be uploaded. These factors include available memory, available hard
disk space, processor speed, and current network traffic. With regular
traffic of files being uploaded, Microsoft recommends that you use a
maximum file size in the range of 10 to 20 megabytes (MB). If you rarely
upload files, the maximum file size may be 100 MB.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #15

P: n/a
Hmm... did you say Web Service?? Why not send the file as MTOM attachment -
using a byte array? If the client that consumes the web service is a smart
client / winform application it would be a quick and fit solution.

"Lacka" wrote:
Hi Kevin,

I don't want to write an FTP client - I just want to upload a file to
somewhere. Like sending a mail - uploading a file. When unsuccessful, I need
to log the error (just "upload unsuccessful"), and don't want to do further
tasks. Therefore looking for a simple FTP uploader solution, that can use
under asp.net - say from a webservice.
Be warned: FTP is a notoriously unreliable protocol, and the examples you
will see are only the bare bones of what you will need to create a robust
FTP client. You will have to handle almost every conceivable type of FTP
transfer error that there is, and there are quite a few.


Mar 24 '06 #16

P: n/a
broken link

"Ken Cox [Microsoft MVP]" wrote:
Hi,

Lots of examples here:

http://www.gotdotnet.com/community/u...aspx?query=ftp

Ken
Microsoft MVP [ASP.NET]

"Lacka" <ke************@inia-solutions.hu> wrote in message
news:ur******************@TK2MSFTNGP15.phx.gbl...
Hi,

How can I transfer files via FTP under asp.net? Don't found any info...

thanks,
Lacka


Mar 31 '06 #17

This discussion thread is closed

Replies have been disabled for this discussion.