| Dart Home | PowerTCP FTP for .NET | Custom Development | Reply | PowerTCP FTP for .NET Topics | Forums |
| Author | Forum: PowerTCP FTP for .NET Topic: FTP Asynchronous EndPut |
| unknowniam From: raleigh, NC USA Posts: 3 Member Since: 06/29/05 |
posted June 29, 2005 5:14 PM FTP Asynchronous EndPut I am using Asynchronous FTP to transfer file. Question: How I can get the local file name if an exception happens? The user wants to view the Message with file name if any error happens. Thank you Example Code Private Sub mFTP_EndPut(ByVal sender As Object, ByVal e As Dart.PowerTCP.Ftp.FileEventArgs) Handles mFTP.EndPut 'If error then throw or handle and rethrow If e.Exception Is Nothing Then Dim file As Dart.PowerTCP.Ftp.FtpFile For Each file In e.Files MsgBox("Successfully uploaded " + file.LocalFileName) Next Else Try If ExceptionPolicy.HandleException(e.Exception, LayerEnum.ErrorPolicy.DataBasePolicy) Then MsgBox("Error for FTP") ‘How to get the Local file name End If Catch ex As Exception Throw ex End Try End If |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted June 30, 2005 12:24 PM The Exception should have a description: MsgBox("Error for FTP: " + e.Exception.Message) If that does not work, then use "State" parameter of BeginPut to hold the name of the local file (or anything else you want) |
| Reply | PowerTCP FTP for .NET Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|