DMX78
Members-
Content Count
17 -
Joined
-
Last visited
Everything posted by DMX78
-
Hi, I need to support old project that built using Delphi 7 and Indy 9, but now I need to add support for SMTP protocol which exist only on Indy 10, so can I install indy 10 on Delphi 7, can you please also tell me the documentation or a website to install it Thank you
-
Okay, thank you very much for the help, I will try it
-
Yes, i've found the files, so to make sure again, here is the summarizes steps: - Remove all existing files related to indy 9 - open all those files - set lib path to source files - compile all - install dc files Can you help me with lib path needed to set? thank you for the help
-
Hi, I'm trying to control a browser using webdrive, I have found 2 project already made webdrive library for delphi they are : https://github.com/mmarquee/DelphiWebDriver and https://github.com/Ericwang1104/WebDriver4D, I've tried both but still having problem with how to use them. I've tried WebDrivers4Delphi and it has better example, I can already load Chrome or Edge and tell them to navigate to a certain url, but I still failed to get element to control the web like to click a button or others and the most important thing is that I want to be able to load chrome or edge extension, it throws an exception saying "cannot base64 decode" I've tried to encode the crx content to base64 but still have the same message. Anyone ever tried this ? Thank you
-
Hi, I'm a little bit confused with Overbyte installation, I installed from get it package manager and choose the ICS FMX and VCL, but it will only install : IcsCommonD110Design IcsCommonD110Run IcsFmxD110Design IcsFmxD110Run IcsVclD110Design IcsVclD110Run But there is another packages : OverbyteIcsD110Design OverbyteIcsD110Run In which I use it previously, so what is the difference between OverbyteICS and ICS package respectively, which one should I installed? I want to install for VCL and FMX. And there is two overbyte entry in Get It Package Manager, the ICS for FMX and VCL component, and the ICS for VCL only. I haven't tried to install the later, but is there a difference between these two component package? Can anyone explain a bit about these packages, thank you. Iwan CS
-
Already clean up my installation, so now I choose to install the VCL FMX package, not the overbyte package
-
Yes, i've seen the install folder and just found out that these two package : OverbyteIcsD110Design OverbyteIcsD110Run actually the same with IcsCommonD110Design IcsCommonD110Run But still need both the vcl and fmx, so I think the OverbyteICS package is depreceated, you can't install both OvebyteICS and IcsCommon. I'm confused because in Sydney or perhaps in Rio, I use OverbyteIcs package while it has changed in the latest release. Well hope this can get solved soon, let me try to refresh this requirement Iwan CS
-
Hi, I have a device that I need to access using FTP component, the device not requiring password, so the password should be left empty, but I can't login to the device's FTP because TFtpClient component will raise an "Password Empty" error, I checked and it happen on this method : TCustomFtpCli.PassAsync where the code will check whether FPassword is empty or not and raise error when empty, so the question is why it have to be a non empty password, even though FTP server should define a password, but there is some that need it to be emptied. I already make the changes by remarking the code line, but I don't know whether it will affect the following code where it use the FPassword. Can someone give an idea on this? or have a fixed by having a property to define whether or not to allow empty password Iwan
-
Can not login to FTP server without password
DMX78 replied to DMX78's topic in ICS - Internet Component Suite
Okey, will try to set it passive mode. Thank -
Can not login to FTP server without password
DMX78 replied to DMX78's topic in ICS - Internet Component Suite
It's a Vision Camera, it has ftp to download last capture image. I will look into other samples you mention, but will read the status code and not sending password if not needed as suggested by @Remy Lebeau I see, so I will check for the status code before sending PASS This is correct, but it takes more time to create a fresh project and add all file for the project, I will do that when there is a major problem with the project file, usually when upgrading android project. This project actually loaded fine, compiled fine, working fine, but problem only when using the FTP, it is true that migrating project should not be done at last minutes. Will be more careful on this next time Haven't made report, maybe I will later, even though I now know the problem might be that it is related with the empty password erorr, but no clear error is the one need to be fixed, but perhaps I didn't do adequate logging mechanism Thank you, Iwan -
Can not login to FTP server without password
DMX78 replied to DMX78's topic in ICS - Internet Component Suite
But what if the server expected an empty password? Yes, I will try that Thank you for the tip, I will look into that sample Yes, this is due to my lack of research on how to do things Agreed, my mistake 😊 Lesson learned, thank you 😊 Just to share a bit of the background on this problem, before using overbyte FTP, I use Indy FTP, it worked without error but that is when I worked on Delphi 10.4. Then I decided to move the project to 11.1, with the same project, just load it in 11.1 and try to recompile, it can recompiled nicely without much effort, but when I try to execute the FTP command to get a file, I got a read time out error, and after struggling with debugging a package project (with the show stopper problem if you notice https://quality.embarcadero.com/browse/RSP-37631) putting log anywhere I know, I can only find out that the component already execute a transfer file method, and it stop with a read time out error. So after trying hard to get to know what the problem, I decided to use overbyte since I also prefer overbyte for communication component and loved it. Then I just choose a random sample in order to get it working, that's why I use the sample and not knowing that I need to check the status code as @Remy Lebeau mention. This project should be just a recompiled and run on 11.1, it is already working on 10.4 and the project need to be alive within a week, that's why I have to do things much faster and skip researching on the component Thank you all for the support, I will try to improved the code, maybe the sample suggested by @Angus Robertson can help me to minimize the long process of getting a file, I see there is a receive command, maybe that is what I'm looking for to make it simpler. Iwan -
Can not login to FTP server without password
DMX78 replied to DMX78's topic in ICS - Internet Component Suite
Here is the code to setup the FTP Client function TCSClass_ICSFTPHelper.GetFile( AFileName: string; const AFileStream: TMemoryStream ): Boolean; begin Result := False; FFTP.HostName := FHostname; FFTP.Port := FPort.ToString; FFTP.UserName := FUserName; FFTP.PassWord := FPassword; FFTP.Binary := FBinaryMode; FFTP.Passive := FPassiveMode; FRemoteFileName := AFileName; FFileStream := TMemoryStream.Create; FResult := 0; FFTP.Open; if FResult = 1 then begin AFileStream.LoadFromStream(FFileStream); FFileStream.Free; Result := True; end else begin ShowStatus('Failed To Get File : %s',[FErrorMessage]) end; end; And here is the code that handle the hand shake, this code is based on the example, and just now I found the problem, thanks to your hint, I did actually still sending the PassAsync method, I'm still trying to understand how to use the component, so I just copy and paste the code from the sample. procedure TCSClass_ICSFTPHelper.HandleOnFTP_RequestDone( Sender: TObject; RqType: TFtpRequest; ErrCode: Word ); begin if ErrCode <> 0 then begin FErrorMessage := Format( '*** ERROR (%s) : %s ***', [IntToStr(ErrCode), FFTP.ErrorMessage ] ); // if RqType <> ftpOpenAsync then // FFTP.QuitAsync // else // ShowStatus('Done.',[]); // Exit; end; case RqType of ftpOpenAsync: FFTP.UserAsync; ftpUserAsync: FFTP.PassAsync; ftpPassAsync: if FPath = '' then FFTP.TypeSetAsync else begin FFTP.HostDirName := FPath; FFTP.CwdAsync; end; ftpCwdAsync: FFTP.TypeSetAsync; ftpTypeSetAsync: begin FFTP.HostFileName := FRemoteFileName; FFTP.LocalStream := FFileStream; FFTP.GetAsync; end; ftpGetAsync: begin FResult := -1; if FFTP.StatusCode = 226 then begin FResult := 1; end; FFTP.QuitAsync; end; ftpQuitAsync: begin if FResult = 1 then begin ShowStatus('File Downloaded',[]); end; ShowStatus('Done',[]); end; else ShowStatus('*** Unknown RqType %s ***',[IntToStr(Ord(RqType))]); end; end; But don't you think it still better to make sure not to raise error when passting empty password? so even if we call the PassAsync directly it will try to send the empty password. This at least will not giving me a half day of work to find the culprit 😊 Iwan -
Can not login to FTP server without password
DMX78 replied to DMX78's topic in ICS - Internet Component Suite
Hi @Remy Lebeau, That's maybe correct, I didn't understand how the FTP protocols works exactly, but if you saying that when the return code is 230, which mean it doesn't necesary to sent PASS again, then there might be something missing in the source code, it should also check when the return code is 230, then don't have to send PASS, do you agree on this? Iwan -
Can not login to FTP server without password
DMX78 replied to DMX78's topic in ICS - Internet Component Suite
Hi @Angus Robertson, It is true that I can still download the file, so it's like that the authentication is ignored. It just that I need to bypass the Error raised by Empty Password checking, the download can continue because I ignored the error. No problem though, but would be nice to have a property to ignore empty password or not. Iwan -
Can not login to FTP server without password
DMX78 replied to DMX78's topic in ICS - Internet Component Suite
Here is a log that I capture when login to the FTP server, the admin user is not using any password, so I try to put any password, but it still saying failed to logged in. Even though I don't understand why it still can download the file 12 Jul 2022 16:46:14:839 : OnStatus : > USER admin 12 Jul 2022 16:46:14:839 : OnStatus : < 230 User admin logged in. 12 Jul 2022 16:46:14:855 : OnStatus : > PASS 123 12 Jul 2022 16:46:14:855 : OnStatus : < 530 Invalid password, not logged in. 12 Jul 2022 16:46:14:855 : OnStatus : > TYPE A 12 Jul 2022 16:46:14:855 : OnStatus : < 200 Type set to ASCII. 12 Jul 2022 16:46:14:855 : OnStatus : > PORT 192,168,1,12,224,35 12 Jul 2022 16:46:14:871 : OnStatus : < 200 PORT command successful. 12 Jul 2022 16:46:14:871 : OnStatus : > RETR image.jpg 12 Jul 2022 16:46:14:871 : OnStatus : < 150 Opening Direct data connection for 192.168.1.12. 12 Jul 2022 16:46:14:956 : OnStatus : < 226 Data Transfer complete. 12 Jul 2022 16:46:14:962 : OnStatus : ! 68,4Kbytes received/sent in 94 milliseconds 12 Jul 2022 16:46:14:964 : OnStatus : > QUIT 12 Jul 2022 16:46:14:964 : OnStatus : < 221 User admin logged out. 12 Jul 2022 16:46:14:964 : OnStatus : File Downloaded 12 Jul 2022 16:46:14:964 : OnStatus : Done Iwan -
Can not login to FTP server without password
DMX78 replied to DMX78's topic in ICS - Internet Component Suite
I use my own code but based on OverbyteIcsBasFtp1.pas sample. Is there a design time property that I need to set? I haven't check that, because I created it at runtime Thank you -
Hi, I'm trying to build a webservice using Overbyte ICS THTTPAppServer component, i plan to run it as a windows service, i've setup the windows service but got problem when trying the AddGetHandler, the class to handle the request seems not recognized. It failed on line : 948 : TMyHttpHandler(Proc)(FLags); on file OverbyteIcsHttpAppServer.pas. It cause access violation. My Setup is the usual windows service template, and i run the HTTPAppServer on serviceStart event The webserver is working, i'm trying using the FHTTPServer.AddGetAllowedPath('/', afBeginBy); routine and it can handle the request Problem only when try to access the URLHandler. so is it possible to make HTTPAppServer as windows service? And how to setup it correctly Thank you