472,993 Members | 2,562 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Problem transferring compressed files via System.Net.FtpWebRequest

SR
Using the examples found on the MSDN website, I successfully wrote code that
transfers files via ftp.

HOWEVER, it does not transfer compressed (zip) files properly. After
transfer, when opening the zip I get an error message that says "The
Compressed (zipped) Folder is invalid or corrupted.".

Any other file transferred is just fine.

Has anyone encountered this with the FtpWebRequest method of file transfer?

Any suggestions?

TIA

SR
Jul 20 '07 #1
2 2335
Hello SR,

Please make sure:
1. you are not using ASCII FTP transfer (needs to be binary)
2. you are not reading or writing binary files with text encoding (the
MSDN sample does this for a text file). Use System.IO.FileStream
instead.

If this doesn't help you out, some source code would help.

Regards
Philipp Fabrizio

Jul 21 '07 #2
SR
Thank you Philipp, that was the problem.

Good code source: http://tinyurl.com/ys29sm

SR.
"Philipp" <ph*************@vbxsystem.dewrote in message
news:11**********************@q75g2000hsh.googlegr oups.com...
Hello SR,

Please make sure:
1. you are not using ASCII FTP transfer (needs to be binary)
2. you are not reading or writing binary files with text encoding (the
MSDN sample does this for a text file). Use System.IO.FileStream
instead.

If this doesn't help you out, some source code would help.

Regards
Philipp Fabrizio

Jul 23 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: frankenberry | last post by:
I have multi-page tiff files. I need to extract individual frames from the multi-page tiffs and save them as single-page tiffs. 95% of the time I receive multi-page tiffs containing 1 or more black...
1
by: SevDer | last post by:
Hi, I am trying to write a simple application which copies the predefined files (hardcoded in the code) to my ftp server. I couldn't make it working. I don't want to use any 3rd party...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
3
by: Incorrect filenames in download link. | last post by:
Hello: I use a W2000+ASP.NET , and I want to execute an external command from a .NET DLL, the line is something like this: psftp.exe root172.168.0.108 -pw root -b bat.txt psftp is a secure ftp...
7
by: Mark Rae | last post by:
Hi, Has anyone successfully used the FTP stuff in the System.Net namespace against a VMS FTP server? I'm trying to do this at the moment and can't even get a directory listing, although there...
0
by: Bob Phillips | last post by:
Hello All: I've seen some strange behavior with the .net FtpWebRequest component. static void Main(string args) { Console.WriteLine("Connecting to server to list directory..."); Uri uri =...
9
by: Waldy | last post by:
Hi there, I have written a service in VS2005 that downloads files from an FTP site processes them and then deletes the files if successfully processed. It all works fine when run in our test lab...
0
by: libish | last post by:
hi all, i'm trying to develop a file uploader, it uses ftp, language is c# the application is c#windows app the main part of code that i use is as below try { FtpWebRequest...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

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.