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, (3423 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 , (3423 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, (3423 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 , (3423 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, (3423 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]
Your support is fantastic.
I would highly recommend this to anyone who needs a good quality SFTP solution.
The wodCrypt product is great and we appreciate your effort to add support for UNIX Crypt.
Thank you so much for your hard work and commitment in producing well thought-out solutions. WeOnlyDo is very committed to customer satisfaction!
The wodCrypt product is great and we appreciate your effort to add support for UNIX Crypt.
Thank you for the great customer service ... I am really impressed with the wodSSH ActiveX control.
...I'm extremely impressed with the product, it represents excellent value for money...
...your service has been phenomenal. It's always quick and you are there when I need you.
It is very refreshing to find such helpful, knowledgeable and quick responding technical support.
Don't be fooled by the cost, it's value and quality far exceeds the price being charged!