Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert app to service

Status
Not open for further replies.

peterve

IS-IT--Management
Mar 19, 2000
1,348
0
0
NL
Hi,

How can I convert my existing C# application into an application that would run as a service, including desktop interaction, and that would not get killed if you log off from the computer it is running on

thanks



--------------------------------------------------------------------
How can I believe in God when just last week I got my tongue caught in the roller of an electric typewriter?
---------------------------------------------------------------------
---------------------------------------------------------------
 
A service is designed to run independently of login or user account. therefore services are not meant to interact with the desktop. depending on how your application is designed implementing a service will either be easy or complex.

if your application is layered, using some form of seperation of concerns, then tie the appropiate functionality to the service. install, run and your in business.

if all your logic is incorporated in the GUI, then you will need to copy/paste or re-code the service to do the same/similar function as the GUI.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
So I guess I have to split the GUI/Config part from the engine part of the application...

Any tips/urls on creating a C# service application ?

thanks



--------------------------------------------------------------------
How can I believe in God when just last week I got my tongue caught in the roller of an electric typewriter?
---------------------------------------------------------------------
---------------------------------------------------------------
 
if you're using the vanilla web services in vs 2005, keep the number of class definitions passed accross the service down as low as you possibly can.

each time an app starts it will have to build an xml serializer on the fly for each class: this is no trivial matter.

microsoft have caught on to this and pretend to allow you to prebuild them.

it would seem, though, that the occasions when the app uses these is very limited. most of the time it just grinds away rebuilding them afresh.

good luck,

mr s. <;)

 
A good example of an app that is a service that has it's UI split apart is SQL Server and it's management tool (can't ever remember the new name for it...)

I don't know how the two halves communicate, but I suspect it's via objects getting serialized across a socket or named-pipe.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top