FTP upload blocked by Firewall
Posted: Wed Feb 04, 2015 11:19 pm
I know that we can add a program to Firewall list and then this program can use FTP to upload the file. Otherwise it cannot.
I have a problem because if the Firewall block the program to do a FTP, it doesn't always show the screen which informs the user about the block and even offer to automatically insert the program to the Firewall list. Sometimes just hangs and then the user don't know what to do, oftenly they can only force the application close... Which is not elegant way of programmatically communication with user.
If I add the program into the Firewall list, then there is no problem of FTP uploading at all. Works perfect...
I am using FTTP class and I narrowed down the moment when the program should be presented by Firewall information if the program is not on the firewall list:
It hangs on:
// This creates the object normaly
oFile = TFtpFile():New( aTarget[ n ], oFTP )
// It hangs on the line below:
oFile:OpenWrite()
It doesn't show any info, just hangs forewer...
Is there any way I can catch the moment the Firewall is blocking opening the file for writting on FTP?
I tried
But this solution doesn't work. The program still hangs on the line which tries to openwrite() It never goes under the CATCH section..
I need to drop to the line after CATCH to inform the user
The problem is that many times the users are not skilled even to find control panel and Firewall entry.
Also, sometimes the system doesn't allow them to add the program into the Firewall because they don't have administrator rights
And now I have problem that there is no at least some brief info for user what to do, the program just hangs... So the user ends up by staring ino the hanged application screen
Any idea here?
I have a problem because if the Firewall block the program to do a FTP, it doesn't always show the screen which informs the user about the block and even offer to automatically insert the program to the Firewall list. Sometimes just hangs and then the user don't know what to do, oftenly they can only force the application close... Which is not elegant way of programmatically communication with user.
If I add the program into the Firewall list, then there is no problem of FTP uploading at all. Works perfect...
I am using FTTP class and I narrowed down the moment when the program should be presented by Firewall information if the program is not on the firewall list:
It hangs on:
// This creates the object normaly
oFile = TFtpFile():New( aTarget[ n ], oFTP )
// It hangs on the line below:
oFile:OpenWrite()
It doesn't show any info, just hangs forewer...
Is there any way I can catch the moment the Firewall is blocking opening the file for writting on FTP?
I tried
Code: Select all
TRY
h := oFile:OpenWrite()
CATCH
alert("791 Cannot Open FTP file for write")
END
I need to drop to the line after CATCH to inform the user
The problem is that many times the users are not skilled even to find control panel and Firewall entry.
Also, sometimes the system doesn't allow them to add the program into the Firewall because they don't have administrator rights
And now I have problem that there is no at least some brief info for user what to do, the program just hangs... So the user ends up by staring ino the hanged application screen
Any idea here?