473,398 Members | 2,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

C# program to service

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?

Sep 12 '06 #1
6 1284
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.
<Az******@gmail.comwrote in message
news:11*********************@p79g2000cwp.googlegro ups.com...
>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?

Sep 12 '06 #2
sadly this is a forms application... otherwise i would've done exactly
what you've suggested.
Martin Robins wrote:
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.
<Az******@gmail.comwrote in message
news:11*********************@p79g2000cwp.googlegro ups.com...
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?
Sep 13 '06 #3
Services don't typically interact with the desktop. Why do you need it
to run as a service?

Brian

Az******@gmail.com wrote:
sadly this is a forms application... otherwise i would've done exactly
what you've suggested.

Sep 13 '06 #4
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.

Brian Gideon wrote:
Services don't typically interact with the desktop. Why do you need it
to run as a service?

Brian

Az******@gmail.com wrote:
sadly this is a forms application... otherwise i would've done exactly
what you've suggested.
Sep 13 '06 #5
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.
Brian Gideon wrote:
Services don't typically interact with the desktop. Why do you need it
to run as a service?

Brian

Az******@gmail.com wrote:
sadly this is a forms application... otherwise i would've done exactly
what you've suggested.
Sep 13 '06 #6
Az******@gmail.com wrote:
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.

Brian Gideon wrote:
Services don't typically interact with the desktop. Why do you need it
to run as a service?

Brian

Az******@gmail.com wrote:
sadly this is a forms application... otherwise i would've done exactly
what you've suggested.
>
>
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

Sep 13 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: UJ | last post by:
I have a program that will upgrade a service automatically. If the service already exists, it will delete the service and then reinstall it through code. To delete the service I'm using the...
5
by: Rich Bernstein | last post by:
Is it possible to write a .NET service that could also be run as a user application? This might be something along the lines of defining multiple entry points, to be used based on how the program...
4
by: Dao | last post by:
I have created a windows service called MyService. I followed the MSDN sample code to add the following code but it did not work. What I tried was that to start another or external program when...
14
by: RDI | last post by:
I'm in the process of wiritng a custom AutoResponder that will run on a spare PC. If I don't write it as an actual "Service" but just a program that starts via the startup folder, will that use...
1
by: MAL | last post by:
Hello, I have 2 classes that work great as a windows app to retrieve and process data from an Oracle9i db. When I implement them in a Service program running as Local System, it fails on the...
17
by: UJ | last post by:
Is there any way for a windows service to start a windows program ? I have a service that will need to restart a windows app if it needs to. TIA - Jeff.
8
by: Sree | last post by:
hello friends, Can i make a C program run as as background service? for eg. like the windows services we have. which are not visible on the desktop but still running behind. If there is some...
7
by: Peter S. | last post by:
I currently have created a C# program that automatically updates an SQL database once everyday. It's an application that I manually start. I want make it so that if the (Windows 2003) server...
0
by: JohnP | last post by:
Hi all Does anyone know the best way to get feedback from a Windows Service? I have written a Windows service which uses a class library (a DLL) which has a timer which does some operations...
3
by: Dean Slindee | last post by:
Need to write a standalone application that processes data once per day. Looking for the application program types available that would satisfy these requirements: Requirements: 1. Unattended...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.