windows service (wodFTPServer)
Hi,
I try to covert the wodFTPServer c# sample to windows service base,
But how can the FTP server event such as ftpd1_LoginPassword being captured in the service?
Thanks and Best regards
Gary
Hi,
I try to covert the wodFTPServer c# sample to windows service base,
But how can the FTP server event such as ftpd1_LoginPassword being captured in the service?
Thanks and Best regards
Gary
by Jasmine, (3371 days ago) @ Gary
Hi Gary.
It's pretty much the same as any console app you would make. Make sure it doesn't end by itself, but after Start it called, there is message loop that would allow wodFTPServer's hidden window to process messages. Something like DoEvents in VB.
Can you try that?
Regards,
Jasmine.
by Gary , (3371 days ago) @ Jasmine
Thanks, Jasmine
I am using C#, could you provide a simple example for that?
Thanks and Best regards
Gary
Hi Gary.
It's pretty much the same as any console app you would make. Make sure it doesn't end by itself, but after Start it called, there is message loop that would allow wodFTPServer's hidden window to process messages. Something like DoEvents in VB.
Can you try that?
Regards,
Jasmine.
by Jasmine, (3371 days ago) @ Gary
Hi Gary.
I'm not that much of a C# expert, but I believe this link would help:
http://stackoverflow.com/questions/2443867/message-pump-in-net-windows-service
inside DLL.Init add startup code for wodFTPServer, and then message pump will continue to run.
Or, you could for a test add
while (true)
Sleep(10);
for a test in your C# code. This will allow messages to process I think but not nice approach.
Jasmine.
by Gary , (3371 days ago) @ Jasmine
Hi Gary.
I'm not that much of a C# expert, but I believe this link would help:
http://stackoverflow.com/questions/2443867/message-pump-in-net-windows-service
inside DLL.Init add startup code for wodFTPServer, and then message pump will continue to run.
Or, you could for a test add
while (true)
Sleep(10);for a test in your C# code. This will allow messages to process I think but not nice approach.
Jasmine.
Thanks,Jasmine
The issue is the wodFTP event cannot be captured in the windows service.
I add the startup code for wodFTPServer in the dll init, and add the code you mentioned in onStart(), but still, the any wodFTP event cannot be captured when client try to connect.
Please help.
Thanks and Best regards
Gary
by Jasmine, (3370 days ago) @ Gary
Hi Gary.
I just tried with regular console application that is easier to test. Following simple code works. Can you try it on your side, and then copy/paste to your service, and check if it works?
Jasmine
[code]namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
wodFTPDComLib.wodFTPDCom Ftp1;
Ftp1 = new wodFTPDComLib.wodFTPDCom();
Ftp1.Protocol = wodFTPDComLib.ProtocolsEnum.FTP;
Ftp1.LoginPassword += new wodFTPDComLib._IwodFTPDComEvents_LoginPasswordEventHandler(Ftp1_LoginPassword);
Ftp1.Start(21);
while (true)
Thread.Sleep(10);
}
static void Ftp1_LoginPassword(wodFTPDComLib.FtpUser User, string Login, string Password, ref wodFTPDComLib.FtpActions Action)
{
Action = wodFTPDComLib.FtpActions.Allow;
}
}
}
[/code]
It is very refreshing to find such helpful, knowledgeable and quick responding technical support.
This has been, by far, the best experience I have ever had dealing with a support entity in my long career in the technical arena
I've heard that you are amazing with your replies coming back so quickly - and now I've seen the speed in which you reply first hand.
Fantastic product by the way, it has helped us tremendously on a daily basis. Keep up the good work.
I've heard that you are amazing with your replies coming back so quickly - and now I've seen the speed in which you reply first hand.
Many thanks for your excellent support service. I can see why you have a long list of excellent testimonials on your website.
This has been, by far, the best experience I have ever had dealing with a support entity in my long career in the technical arena
You made it so simple for us to integrate SFTP - a technology we had little experience with...
...with the SFTP interface you produced, everything was so simple to understand, we were able to start coding almost immediately!
I really like these products - they are consistently first rate!