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, (3371 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]
The people at WeOnlyDo are amazing! ... I always get a super fast response from customer service, and the products are great too. Thanks WeOnlyDo
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.
...I'm extremely impressed with the product, it represents excellent value for money...
...with the SFTP interface you produced, everything was so simple to understand, we were able to start coding almost immediately!
We are having great success with your component ... email server that has over 750 000 mailboxes back ended by a SQL server...
Thank you very much for the rapid responses. I was a little nervous about dealing with a company that is on a different continent from me. You have proven my concerns to be unfounded.
Count us as a satisfied WeOnlyDo customer. We appreciate your terrific support to get the secure Telnet working properly.
...with WOD's excellent support I was able to bypass Winsock and focus on the task at hand...
Don't be fooled by the cost, it's value and quality far exceeds the price being charged!
The people at WeOnlyDo are amazing! ... I always get a super fast response from customer service, and the products are great too. Thanks WeOnlyDo