Dart Home | PowerTCP FTP for .NET | Custom Development | Reply | PowerTCP FTP for .NET Topics | Forums |
Author | Forum: PowerTCP FTP for .NET Topic: A blocking operation was interrupted by a call to WSACancelBlockingCall |
dheeruchakri dheeru.chakri@gmail.com From: Hyd, India Posts: 4 Member Since: 11/07/08 |
posted November 7, 2008 6:24 AM I receive the following exceptions. #1 exp: A blocking operation was interrupted by a call to WSACancelBlockingCall #2 exp: Send failed at the Socket Level. The Socket may have been closed abruptly or timed out. My application is a multithreaded and 5 concurrent threads will be uploading files to a FTP Server. When only one application is run I see no issues. However, if the second application was started its throwing the mentioned exceptions. Each of the applications are multithreaded and each of them initiate 5 threads. so a total of 10 threads will be running when two applications were started. Thanks for all/any help at the earliest. |
Jason Farrar (Admin) From: Oneida, NY USA Posts: 223 Member Since: 07/24/07 Extra Support Options Custom Application Development |
posted November 10, 2008 1:24 PM We need you to wire up the trace event and send us a log of the communications between the ftp server and your application. Here is a code snippet to accomplish this: 'Wire up the trace event to your ftp control this.ftp1.CertificateRequested += new System.EventHandler(this.ftp1_CertificateRequested); //The event will fire whenever data is sent or received private void Ftp1_Trace(object sender, Dart.PowerTCP.Ftp.SegmentEventArgs e) { // Create FileStream to write to log file System.IO.FileStream stream1 = new System.IO.FileStream("c:\\FtpTest\\log.txt", System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.ReadWrite); // Create text to precede sent/received data. byte[] recv = System.Text.ASCIIEncoding.ASCII.GetBytes("\r\nReceived <-- \r\n"); byte[] sent = System.Text.ASCIIEncoding.ASCII.GetBytes("\r\nSent --> \r\n"); // Set the stream position to append. stream1.Position = stream1.Length; // Check if data is incoming or outgoing and write appropriate data if(e.Segment.Sent == true) stream1.Write(sent, 0, sent.Length); else stream1.Write(recv, 0, recv.Length); // Write the data stream1.Write(e.Segment.Buffer, e.Segment.Offset, e.Segment.Count); // Close the stream stream1.Close(); } |
dheeruchakri dheeru.chakri@gmail.com From: Hyd, India Posts: 4 Member Since: 11/07/08 |
posted November 13, 2008 8:04 AM he following exceptions were thrown after wiring up the Trace event. Environment: Number of threads : 10 Number of instances : 5 OS : Windows 2003 FTP Server: Serv-U Exception #1 Failed while uploading Images, exp: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond at Dart.PowerTCP.Ftp.ai.Invoke(Delegate A_0, Object[] A_1) at Dart.PowerTCP.Ftp.Ftp.Invoke(FtpCommand command, String modifier) at Dart.PowerTCP.Ftp.Ftp.Close() Exception #2 Failed while uploading Images, exp: Send failed at the Socket Level. The Socket may have been closed abruptly or timed out. at DPI.OMS.UtilityLibrary.IO.FtpUtility.Upload(String localFilename, String targetFilename) at DPI.OMS.BusinessLibrary.VendorApp.BUploadAssets.UploadImage(OrderAsset objOrderAsset) at DPI.OMS.BusinessLibrary.VendorApp.BUploadAssets.UploadImages() Any help at the earliest will be very helpful. |
dheeruchakri dheeru.chakri@gmail.com From: Hyd, India Posts: 4 Member Since: 11/07/08 |
posted November 17, 2008 1:53 AM Am not able to post the log file because its huge. We have been testing with around 1500 images. Please let me know as to where the logs should be uploaded. |
Jason Farrar (Admin) From: Oneida, NY USA Posts: 223 Member Since: 07/24/07 Extra Support Options Custom Application Development |
posted November 17, 2008 4:23 PM You can send them to support@dart.com. I sent you an E-mail on Friday did you receive it? |
dheeruchakri dheeru.chakri@gmail.com From: Hyd, India Posts: 4 Member Since: 11/07/08 |
posted November 18, 2008 12:55 AM Hi Jason, I did receive the hot fix. Am working on it to verify if the exceptions vanish. I will let you know more after my testing. However, the logs files were dispatched to support@dart.com per your input. Thanks for all the help at the earliest. Thanks, Dheeraj |
Reply | PowerTCP FTP for .NET Topics | Forums |
This site is powered by PowerTCP WebServer for ActiveX |