Login  
Search All Forums
Dart Home | PowerTCP FTP for .NET | Custom Development Reply | PowerTCP FTP for .NET Topics | Forums   
AuthorForum: PowerTCP FTP for .NET
Topic: Busy after using SegmentedStream
Terrence

From: Austin, TX USA
Posts: 13
Member Since: 04/22/04
posted May 20, 2004 4:13 PM

I am sending small files to 5 different locations. I am sending a text string instead of a file on disk. I am getting an error even after I close the ftp1 module.

Listed in this order.
Error
Strace message
Code Example

BusyException: Operation in progress.
  at c.b()
  at c.Invoke(Delegate CurrentDelegate, Object[] args)
  at Dart.PowerTCP.Ftp.Ftp.Put(String remoteFileName, Int64 restartMarker)
  at MAC.CPO.Send.SendFilings.SendLogFile(SubscriberDRO subscriber, DateTime dateOfFilings)

******************************************

220 Microsoft FTP Service
USER xxxxx
331 Password required for ftpfirst.
PASS xxxxx
230 User ftpfirst logged in.
TYPE I
200 Type set to I.
PORT 192,168,0,22,10,228
200 PORT command successful.
STOR CpoLog20040519.log
150 Opening BINARY mode data connection for CpoLog20040519.log.
QUIT
226 Transfer complete.

*******************************

ftp1.Username = subscriber.ftpusername.Trim();
ftp1.Password = subscriber.ftppassword.Trim();
ftp1.ServerPort = Convert.ToInt16(subscriber.ftpport);
ftp1.Server = subscriber.ftpaddress.Trim();
ftp1.FileType = Dart.PowerTCP.Ftp.FileType.Image;
ftp1.DoEvents = true;
ftp1.Passive = subscriber.ftppassive;
ftp1.Restart = false;

string logFileName = "CpoLog" + Utility.Utility.DTOS(dateOfFilings) + ".log";
//the logfilename is the name of the file that will be created on the remote server
Dart.PowerTCP.Ftp.SegmentedStream sstream = ftp1.Put(logFileName, 0);
sstream.Write(xmlLogString);
sstream.Close();

if (ftp1.Connected)
ftp1.Close();

************************************

Thanks for your help.
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted May 20, 2004 4:31 PM

Is there some reason that you are using the Segmented stream?

Please take a look at the PutStream sample and try to do it that way and see if it works.

Terrence

From: Austin, TX USA
Posts: 13
Member Since: 04/22/04
posted May 20, 2004 4:44 PM

Tony, PutStream seems to take a stream.

I have STRING I want to send. Should I be using the PUTStream example?

Thanks
Terrence
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted May 20, 2004 4:47 PM

It creates a memory stream from the text in the textbox.

Terrence

From: Austin, TX USA
Posts: 13
Member Since: 04/22/04
posted May 20, 2004 4:57 PM

My SteamPUT Demo has a select stream button that gives you a file picker dialog. It then puts the file that you selected to the server. Am I looking at the wrong example?

C:\Program Files\PowerTCP\FTP for .NET\Samples\C#\StreamPut
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted May 20, 2004 5:06 PM

Oh sorry, I guess you are right. Can you please make a stand alone app that does what you are trying to do?

Once I get it I will try it out and tell you what you need to do to get it to work.

Please zip the app up and email it to support@dart.com
Terrence

From: Austin, TX USA
Posts: 13
Member Since: 04/22/04
posted May 20, 2004 5:16 PM

Well you probably won't be able to recreate it.

It happens after I send to a certain site. If I send in a different order and leave that "bone headed" site out of the list, the foreach loop works. So something is hanging up on that server.
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted May 21, 2004 8:39 AM

Get you get us a test account? If so, I could run your test here.

Terrence

From: Austin, TX USA
Posts: 13
Member Since: 04/22/04
posted May 21, 2004 9:04 AM

No, I don't think so, these are financial compannies. 

It will be easier for me to put the string to disk and ftp the file. That seems to be working in another routine with this group of targets.

Can you tell from the error any hint as to why it says it is complete, yet gets a busyexception?

Thanks.
Terrence
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted May 21, 2004 9:36 AM

Have you tried using the Trace event to create a log (the sample listview shows how)?

Then you could compare the transfer from a working server to a non-working one.
Terrence

From: Austin, TX USA
Posts: 13
Member Since: 04/22/04
posted May 21, 2004 5:36 PM

Tony, I figured it out. It was an error on my part. I was not setting the correct target directory.

Your product is working just fine. 

Sorry for the time you had to spend on my problem.

Terrence
Reply | PowerTCP FTP for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX