Converting Windows C# Application to Windows Service

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • skumardss
    New Member
    • Mar 2008
    • 2

    Converting Windows C# Application to Windows Service

    Hi Techees...

    We have a Windows C# Application (Business Layer) which does communicate between the User Interface Layer and Data Layer. We need to convert this application to a Windows Service.

    We tried creating Windows Service Application in .NET framework and refered the dll of the Business Layer and then invoked the main method of the Busines Layer within the OnStart event of the Service Application. Once after doing this we were able to build the application with no errors. Then, when we tried to install the service using InstallUtil, it just displays "Sevice XXXXXX installing..." but hangs here without completing the isntallation.

    If any one has any suggestion, please post...

    Also, tell us if this is the right way to do the convertion to Windows Service or if there is any other better way?

    Thanks in advance,
    Kumar
  • epots9
    Recognized Expert Top Contributor
    • May 2007
    • 1352

    #2
    Moved to the .NET Forums where the resident experts can better assist you.

    **Moved from Programming Challenges.

    Comment

    • balabaster
      Recognized Expert Contributor
      • Mar 2007
      • 798

      #3
      Rather than a Windows Service, I would probably lean towards a Web Service... however, .Net Remoting may be an alternative you can consider. It really depends on how complex the environment is, and your strategy for accessing the data - and in some cases really comes down to personal preference. Web services are relatively simple to develop and consume and provide a lot of flexibility and I've yet to come across a situation where .Net Remoting could not be used as a replacement in principle. I personally wouldn't use a Windows Service as a data layer to my application - but that's just me. There are probably programmers out there that favour this method, but I can't think of a logical reason to use them rather than Web Services or .Net Remoting.

      Comment

      Working...