473,408 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

How to transfer files via FTP under .net?

Hi,

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

thanks,
Lacka
Nov 19 '05 #1
16 5056
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
Thanks!
Lots of examples here:

Nov 19 '05 #3
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
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
> 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
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
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
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
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
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
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

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
> 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


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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Abhishek | last post by:
I have a problem transfering files using sockets from pocket pc(.net compact c#) to desktop(not using .net just mfc and sockets 2 API). The socket communication is not a issue and I am able to...
4
by: Weston Weems | last post by:
I've got the simple problem where I'd like to transfer somewhat large files to my webserver via http/webservice/something like that. My question is what kinda limits have people been able to...
1
by: henrycortezwu | last post by:
Hi All, I'd like to transfer files from a Desktop computer to my Cellphone/PDA using VB.NET I've research a bit on this, and I found that I would need to do it using OBEX via Serial Bluetooth...
8
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really...
11
by: E.T. Grey | last post by:
Hi, I have an interesting problem. I have a (LARGE) set of historical data that I want to keep on a central server, as several separate files. I want a client process to be able to request the...
1
by: Alex | last post by:
Hello, I'm trying to write a little php script to transfert some files from a server to clients (web/http). It's working fin with small files. But transfering big files (try on 1Gb) failed!...
10
by: David | last post by:
I have googled to no avail on getting specifically what I'm looking for. I have found plenty of full blown apps that implement some type of file transfer but what I'm specifcally looking for is an...
2
yashg
by: yashg | last post by:
I am building a data backup application in C# using Sockets. It has a server component and a client component. The client is going to upload files to the server through TCP sockets. I've got all...
0
by: vasikaran | last post by:
Hi , i hava one ftp script in batch file programming , ftp script is working fine.. but my is i dont know how much files and what are files avaiulable in remote folder ,,,, if any errors or...
1
by: shyaminf | last post by:
hi everybody! iam facing a problem with the transfer of file using servlet programming. i have a code for uploading a file. but i'm unable to execute it using tomcat5.5 server. kindly help me how to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.