473,382 Members | 1,749 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,382 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 2354
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.