Home Forums .NET libraries Xceed SFTP/FTP for .NET Process was terminated due to an unhandled exception

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #21359 |

    Hi,

    i have post the same subject on an FtpTimeoutException which can’t be catch before (see http://xceed.com/CS/forums/thread/23648.aspx)

    My windows services crash 5 time a day every day dut to this exception and i can’t find any answer.

     I repost my stacktrace here, thank you i you have some clue :

     initial error catchable :

       Xceed.Ftp.FtpTimeoutException: The FTP command execution timed-out.

       at Xceed.Ftp.Engine.ConnectFtpCommand.Execute(FtpCommandChannel commandChannel)

       at Xceed.Ftp.Engine.BaseFtpCommand.BackgroundWorker_DoWork(Object sender, DoWorkEventArgs e)

       at Xceed.Ftp.BackgroundWorkerWrapper.DoWorkThreadStart()

     .NET Runtime error uncatchable which crash the service :

       Description: The process was terminated due to an unhandled exception.

       Exception Info: System.ObjectDisposedException

       Stack:

       at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean ByRef)

       at Microsoft.Win32.Win32Native.SetEvent(Microsoft.Win32.SafeHandles.SafeWaitHandle)

       at System.Threading.EventWaitHandle.Set()

       at Xceed.Ftp.Engine.FtpDataConsumerCommand+<>c__DisplayClass8.<BeginProcessData>b__7(System.Object)

       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()

       at System.Threading.ThreadPoolWorkQueue.Dispatch()

       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

     

     

    thanks for attention 

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by David (had 1994 views)

    Xceed Support
    Member
    Post count: 5658

    Hi David,

    Can you set the TraceWriter property so we can get a log of the communication with the server?

    Example (C#):

    myFtpClient.TraceWriter = new StreamWriter( @”D:\Log\XceedFtp.log”, true );

    or

    myFtpConnection.TraceWrite = new StreamWriter( @”D:\Log\XceedFtp.log”, true );

    Example (VB.NET):

    myFtpClient.TraceWriter = New StreamWriter(“D:\Log\XceedFtp.log”, True)

    or

    myFtpConnection.TraceWrite = New StreamWriter(“D:\Log\XceedFtp.log”, True)

    Can you also provide the relevant code snippet that your are using to do the transfer?

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Marc [Xceed] (had 261 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi, 

    i think it’s not a xceed problem (can’t see anything wrong on log) but probably due to a framework 4 issue with my multithread code and exception uncatch throw by FTP component.

    I put a  <legacyUnhandledExceptionPolicy enabled=”1″/> flag and i don’t have the problem anymore.

    Thanks,

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by David (had 1324 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.