windowswinformswindows-servicesbackground-application

Need suggestion on replacing Windows Service by invisible WinForm Application


I need a background application to support my client application, which should always run on the client machine regardless of the main client application is running or not.

Windows Service was my first choice but problems I faced with Windows Service were: ease of control over windows service through main client application, release and installation of patches to the windows service and troubleshooting if windows service fails to run.

So, I started thinking for alternatives to the Windows Service and found that a Windows Forms application with NO visible forms can do it for me. This invisible app should start with system startup and keep running all the time, doing all the work that a Windows Service would do. But before I go deeper into the development, I want to explore the pros and cons of this approach.

Any suggestions/comments on this approach?


Solution

  • Your requirements are more suited for windows service. Main advantage with windows service is that it will start as soon as system comes up, irrespective of anybody is logged into system or not.

    To sort out deployment issues, you build your business logic into separate assembly and call the necessary function withing windows service. This way you can deploy just the modified assembly.

    Winform application with invisible form will not serve the purpose. HTH