C# program to service

  • Thread starter Thread starter AzenAlex
  • Start date Start date
A

AzenAlex

I have a fairly large application written in C# that i would now like
to run as a service. Is there a simple way to do this?
 
Assuming that the existing program has no UI and can easily be called by
creating an instance of a class and calling a method to start and another
method to stop; simpy create a Windows Service project and add the necessary
to the service1 classs created.

If you have any UI that drives the app, that is a different story.
 
sadly this is a forms application... otherwise i would've done exactly
what you've suggested.
 
Services don't typically interact with the desktop. Why do you need it
to run as a service?

Brian
 
It's a screen recorder, not a virus application, using it to monitor
employee screens for quality assurance. We'd like for the employees not
to be able to easily end the application.
 
also i believe it would be possible for me to recode this application
to not use forms (i'm not completely sure since i'm not the original
author) but i'm just looking for an easier way to do things... There
also is a version of this program that doesn't run completely silent.
In this version an employee must first login via a form and then the
application will begin to run in the background. I'd like to still be
able to do this even with the program running as a service.
 
It's a screen recorder, not a virus application, using it to monitor
employee screens for quality assurance. We'd like for the employees not
to be able to easily end the application.

A simple solution might be to only allow persons in a certain group to
exit the app, perhaps by specifying proper credentials. To prevent
them from using TaskManager, you can disable that through a security
policy.

Also, perhaps you can have the app periodically connect to a central
server app. And if it fails to do so within a certain amount of time,
you know that it has been terminated.

Otherwise, you should try to separate the UI portion of your app with
the business logic. The business logic would be moved to a service.

Just some thoughts
 
Back
Top