Re: Function works during step through but not on regular run
Originally Posted by coolbiz
Did you try that CLASS? It is based on the Microsoft sample (modified a little to make it work w/ OPTION EXPLICIT and OPTION STRICT set to ON) and it works for me w/o putting any delay. I've tried to access my local FTP server and a public FTP server on the internet.
Yeah, that file looks pretty much identical to mine. I had a downloaded copy that I found on another site and it wasn't working so I then went to the microsoft site and did a copy paste of what they had in that example and still no go so in came the delay.
Re: Function works during step through but not on regular run
I know that they are almost identical. I copied it from Microsoft website and made a little modification just to make it work w/ OPTION EXPLICIT and OPTION STRICT set to ON.
I've made a test app that uses the modified class. Download this and compile to run it. Tell me if the problem still persists:
Re: Function works during step through but not on regular run
Originally Posted by coolbiz
I know that they are almost identical. I copied it from Microsoft website and made a little modification just to make it work w/ OPTION EXPLICIT and OPTION STRICT set to ON.
I've made a test app that uses the modified class. Download this and compile to run it. Tell me if the problem still persists:
Problem is still there. Your file list box shows:
Code:
Files in /sprint on ftp.ftpname.com:
1: File1.jpg
2:
So I added the sleep delay of 10 ms in at the same place. Sure enough all 15 files poped up. Maybe the FTP server I'm connecting to is slow in its replies. On another note man your UI code is cleaner then mine.....
Re: Function works during step through but not on regular run
Hmm ... that is the wierd thing. It works fine for me w/o putting the delay in and I've tried it on my home and work PC. I'm wondering if you have updated your .Net framework to the latest version. Maybe, there lies the problem.
If that still does not solve your problem, I'd suggest to try out 3rd party component. There are bunch out there and some of them are pretty cheap
Re: Function works during step through but not on regular run
Originally Posted by coolbiz
Hmm ... that is the wierd thing. It works fine for me w/o putting the delay in and I've tried it on my home and work PC. I'm wondering if you have updated your .Net framework to the latest version. Maybe, there lies the problem.
If that still does not solve your problem, I'd suggest to try out 3rd party component. There are bunch out there and some of them are pretty cheap
Yeah its goofy but at least I have a decent work around. Everythings up to date (Dot Net v1.1 SP1 with the MS patches) and like I said the delay, even only a couple ms works fine so I can live with it. Thanks for your help.
Re: Function works during step through but not on regular run
Tried the program from a couple other computers and a couple other servers. Sure enough I do think its server/connection/reply speed based. Some FTP's are just slower then others.
On another note I needed to be able to CHMOD the files after I transfered them but that functionallity is not built into the Microsoft FTP class so I put it in myself, maybe it will help someone else:
Code:
' Change a files attributes on the FTP Server.
Public Sub CHMOD(ByVal sAttributes As String, ByVal sFileName As String)
If (Not (m_bLoggedIn)) Then
Login()
End If
SendCommand("SITE CHMOD " & sAttributes & " " & sFileName)
If (m_iRetValue <> 200) Then
MessageString = m_sReply
Throw New IOException(m_sReply.Substring(4))
End If
End Sub
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.