Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2007

Tip: Looking for answers? Try searching our database.

FTP File upload, damage.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dexter Drupsteen - 20 Jan 2007 16:20 GMT
Hi Everyone,
I'd like to ask you what goes wrong in my program. Its a simple Ftp
uploading program, designed to upload just one file (a *.exe), as it does.
But if I copy the same file back to my desktop and run it I recieve error
codes like: C:\.....\test2.exe
The NTVDM-CPU recieved an invalid instruction.
CS:9fff IP:0054 OP:db ff ff db e7

The code uses StreamReader to read out the file.  
Encoding::UTF8->GetBytes(obj->ReadToEnd()) puts it in a byte array and
uploads the whole lot, using the write function of the  Stream class.
And yes, UseBinary is set to true.

Thanks in andvance,
Dexter
Carl Daniel [VC++ MVP] - 20 Jan 2007 17:17 GMT
> Hi Everyone,
> I'd like to ask you what goes wrong in my program. Its a simple Ftp
[quoted text clipped - 8 lines]
> uploads the whole lot, using the write function of the  Stream class.
> And yes, UseBinary is set to true.

Don't use a StreamReader - just read from the stream directly.  Using the
UTF-8 stream reader causes the byte stream to be interpreted as UTF-8, which
it's not.

-cd

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.