services and console apps...

  • Thread starter Thread starter Daniel Bass
  • Start date Start date
D

Daniel Bass

Forgive me if this is in the wrong place, I couldn't find a suitable .net
services newsgroup to post in.

I read in services that they are designed to have no UI, but I'd like to
create one that can be run from the command line, and in doing so would act
as a console application for debugging purposes.

Is this concept legit, feasible, possible?
How would i go about approaching it?

Thanks for your time.
Dan.
 
Hi Daniel,
I read in services that they are designed to have no UI, but I'd like to
create one that can be run from the command line, and in doing so would act
as a console application for debugging purposes.

This is absolutely fine approach, if not even recommended one. You analyze
the command line arguments and start as a console application or as a
service depending on them.
 
Thanks for your reply.

I've created all the application code as a .Net class library, which exposes
Run, Stop, and a Refresh command which pauses the service while the
configuration is changed.

Is the idea to have the OnStart() OnEnd methods call these exposed
functions, and then to create a console app which calls the same functions
so that there's an output window for debug log data?

Or is the .Net approach different to this?

Thanks! =o)
Dan.

in message Hi Daniel,
I read in services that they are designed to have no UI, but I'd like to
create one that can be run from the command line, and in doing so would act
as a console application for debugging purposes.

This is absolutely fine approach, if not even recommended one. You analyze
the command line arguments and start as a console application or as a
service depending on them.
 
Back
Top