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, (3424 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 , (3424 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, (3424 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 , (3424 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, (3424 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]
Congratulations on an excellent product and first rate support!
Thanks! We love your software and your great support!
Your customer service was excellent, and I will look at your products in the future for precisely that reason.
WeOnlyDo!COM will be the first stop I make should I require any further off-the-shelf components.
Just thought you'd like to know that my gateway app with your SMTP Server component held the line against a DDOS attack today...
I can only hope I will have the pleasure to work with other products by "We Only Do" in the future.
Thank you so much for your hard work and commitment in producing well thought-out solutions. WeOnlyDo is very committed to customer satisfaction!
Fantastic product by the way, it has helped us tremendously on a daily basis. Keep up the good work.
Thank you so much for your hard work and commitment in producing well thought-out solutions. WeOnlyDo is very committed to customer satisfaction!
Brilliant, even works on the mobile phone...