| Dart Home | PowerTCP FTP for .NET | Custom Development | Reply | PowerTCP FTP for .NET Topics | Forums |
| Author | Forum: PowerTCP FTP for .NET Topic: Put fails with unknown error 0x274c |
| gthrower From: Colorado Springs, CO USA Posts: 9 Member Since: 12/06/02 |
posted April 7, 2003 1:30 PM I have a program (vb.net) that does a put based on command line input. It works very well except for one site where I use an anonymous login and then it fails with and unknown error (0x274c). I can use the microsoft command line ftp and it works every time with now errors. I have tried using the trace method and the output doesn't make any sense to me. Any help would be appreciated. This is driving me crazy. Username = anonymous before put Dart.PowerTCP.Ftp.SegmentEventArgs Dart.PowerTCP.Ftp.SegmentEventArgs Dart.PowerTCP.Ftp.SegmentEventArgs Dart.PowerTCP.Ftp.SegmentEventArgs Dart.PowerTCP.Ftp.SegmentEventArgs Dart.PowerTCP.Ftp.SegmentEventArgs Dart.PowerTCP.Ftp.SegmentEventArgs Dart.PowerTCP.Ftp.SegmentEventArgs Unknown error (0x274c) |
Jeff Cranford![]() From: Rome, NY USA Posts: 586 Member Since: 05/30/01 |
posted April 7, 2003 1:42 PM It looks like you are writing to the log file by using e.ToString(), thus the occurrence of "Dart.PowerTCP.Ftp.SegmentEventArgs" multiple times in your trace. You should be writing the the data in the buffer to the file (what is contained in e.Buffer). |
Jeff Cranford![]() From: Rome, NY USA Posts: 586 Member Since: 05/30/01 |
posted April 7, 2003 1:47 PM Or you could use e.Segment.ToString(). The following code snippet is from our samples and demonstrates creating a log file. private void ftp1_Trace(object sender, SegmentEventArgs e) { //Write to Log File if (m_WriteLog) { FileStream f; try {f = new FileStream(m_LogFile, FileMode.Append);} catch { m_LogFile = Application.StartupPath + "\\" + APP_NAME + ".log"; f = new FileStream(m_LogFile, FileMode.Append); } string line; if (e.Segment.Sent) line = "C->" + e.Segment.ToString() + "\r\n"; else line = "S<-" + e.Segment.ToString() + "\r\n"; f.Write(System.Text.Encoding.ASCII.GetBytes(line), 0, line.Length); f.Close(); } } |
| gthrower From: Colorado Springs, CO USA Posts: 9 Member Since: 12/06/02 |
posted April 7, 2003 2:44 PM Thanks. I had just copied the code from the help file. I'm at least getting some info now but still have the problem. Here is the new output any idea what the problem might be. Username = anonymous before put 220 freki Microsoft FTP Service (Version 5.0). USER anonymous 331 Anonymous access allowed, send identity (e-mail name) as password. PASS user@domain.com 230-Welcome to the FTP site. 230 Anonymous user logged in. PASV 227 Entering Passive Mode Unknown error (0x274c) |
| gthrower From: Colorado Springs, CO USA Posts: 9 Member Since: 12/06/02 |
posted April 7, 2003 2:48 PM Never mind. I found the problem. The remote site does not like the passive mode. Thanks for your assistance. Gary Thrower |
Jeff Cranford![]() From: Rome, NY USA Posts: 586 Member Since: 05/30/01 |
posted April 7, 2003 2:52 PM I found the section of the help file that you are referring to. Sorry about that. We will fix the incorrect code example and make the fixed docs available in future releases. |
| Reply | PowerTCP FTP for .NET Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|