471,093 Members | 1,982 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,093 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 2265
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Incorrect filenames in download link. | last post: by
7 posts views Thread by Mark Rae | last post: by
reply views Thread by Bob Phillips | last post: by
9 posts views Thread by Waldy | last post: by

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.