Re: WodVpn in windows service - WeOnlyDo Discussion board

Re: WodVpn in windows service (General questions)

by wodDamir, Monday, October 26, 2009, 15:26 (5506 days ago) @ qaiser

Hi Qaiser,

What I believe the problem in your case is that the application ends immediately as it goes thru the code. Since it's a Console Application / Service, the application will run, and end as soon as all code is executed (that doesn't have to mean it actually finished). Nothing is actually *keeping* the Service running.

When using Forms Application, the code will run as long as Form is open.

To resolve this, I would suggest moving wodVPN into a separate thread, and use AutoResetEvent object to keep your service running.

Can you try something like that?

Regards,
Damba


Complete thread: