FTP Error handling

wakestar
Member Posts: 207
Hi all
there are a lot of samples in this forum how to use FTP transfer to up-/download files with navision. But does anybody have a solid error handling?
I wrote a Form which is running with a timer. Twice a day the form writes a txt-File and runs a cmd-script which uploads the txt-file to a ftp-server. It's also possible to run the export manually with different parameters, etc.. Everything works fine... except ... the ftp upload fails for some reason. And yes, I'm able to write a ftp-log but the Navision - user is too lazy to check this log every day. He wants a Message when the ftp-upload fails.
Any tips? :-k
Thank you
there are a lot of samples in this forum how to use FTP transfer to up-/download files with navision. But does anybody have a solid error handling?
I wrote a Form which is running with a timer. Twice a day the form writes a txt-File and runs a cmd-script which uploads the txt-file to a ftp-server. It's also possible to run the export manually with different parameters, etc.. Everything works fine... except ... the ftp upload fails for some reason. And yes, I'm able to write a ftp-log but the Navision - user is too lazy to check this log every day. He wants a Message when the ftp-upload fails.
Any tips? :-k
Thank you

0
Comments
-
Can't you just read the ftp-log, using Navision, and display a message when some error is listed in this log?No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
-
Luc Van Dyck wrote:Can't you just read the ftp-log, using Navision, and display a message when some error is listed in this log?
a successful log:Ftp> Verbunden zu ftp.xxxx.xxxxxxxx.ch.
open ftp.xxxxx.xxxxxx.ch
220 donna Microsoft FTP Service (Version 5.0).
Benutzer (ftp.xxxx.xxxxxxx.ch:(none)):
331 Password required for xxxxxxxxxx.
230 User xxxxxxxxx logged in.
Ftp> Ftp>
put scttoweb.csv
200 Port command successful
150 Opening data channel for file transfer.
226 Transfer OK
FTP: 64d Bytes gesendet in 0.74Sekunden 140.39KB/s
ftp> close
221 Goodbye
ftp> Bye
now the easiest way would be to search for "226 Transfer OK"
if this line is missing... the ftp upload probably failed....
now this form is running on a dedicated computer... and the lazy user is working on a different pc. Now I need to create dynamically an e-mail message to... d'oh!... #-o0 -
Nobody has said it would be easy ;-)No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
-
I would create a .net control ftp client. Have errors in the control generate an event (not an error). Then have navision handle the event.
the basics on creating the .net control are here
http://www.ondotnet.com/pub/a/dotnet/20 ... dotnet.htm
of course, you'd have to make this follow com.0 -
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions