question

ANB avatar image
0 Votes"
ANB asked cheong00 edited

Console Application or API for Windows Services

If I have to run an application under Desktop Windows Services, what would be the best ?
Have a console application or an API ?

Thx

dotnet-csharp
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

DuaneArnold-0443 avatar image
0 Votes"
DuaneArnold-0443 answered cheong00 edited

You can remove the form out of a Windows form project and execute the exe from a Windows service program. It's a formless exe file. like a console program, but there is no desktop form or communications happening with the program. If you want to communicate with the program from the service, you can use Named Pipes.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

That' right, although I usually will start with "Console" application template to remove the dependency on GUI system libraries, so that this service will also run on Server Core versions.

0 Votes 0 ·