Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Adding service to c# windows application

Adding service to c# windows application

Scheduled Pinned Locked Moved C#
questioncsharp
5 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sarang_k
    wrote on last edited by
    #1

    Hi all, In my system in a service is running at the backend.I want to use that service in my windows application how can i do it ? An exe file for that service also i am having. But how can i use that service in my application. Thanks in advance.

    D 1 Reply Last reply
    0
    • S sarang_k

      Hi all, In my system in a service is running at the backend.I want to use that service in my windows application how can i do it ? An exe file for that service also i am having. But how can i use that service in my application. Thanks in advance.

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      Is it a windows service? Or a web service?

      "The worst code you'll come across is code you wrote last year.", wizardzz[^]

      S 1 Reply Last reply
      0
      • D dan sh

        Is it a windows service? Or a web service?

        "The worst code you'll come across is code you wrote last year.", wizardzz[^]

        S Offline
        S Offline
        sarang_k
        wrote on last edited by
        #3

        Its a windows service which is already running, but i am not having any svc or any other file.Only exe file of that service is available.

        D 1 Reply Last reply
        0
        • S sarang_k

          Its a windows service which is already running, but i am not having any svc or any other file.Only exe file of that service is available.

          D Offline
          D Offline
          dan sh
          wrote on last edited by
          #4

          What do you mean by "using" it? If you want to start or stop the service, you can use ServiceController class. If you need to call a method from the service, you should not be using the service at all. If it has class library collection for the business layer and data access etc, use them as reference in your application.

          "The worst code you'll come across is code you wrote last year.", wizardzz[^]

          J 1 Reply Last reply
          0
          • D dan sh

            What do you mean by "using" it? If you want to start or stop the service, you can use ServiceController class. If you need to call a method from the service, you should not be using the service at all. If it has class library collection for the business layer and data access etc, use them as reference in your application.

            "The worst code you'll come across is code you wrote last year.", wizardzz[^]

            J Offline
            J Offline
            Joshi Rushikesh
            wrote on last edited by
            #5

            You have not mentioned, How you want to use that service? SVC file is only required to register a service as a windows service, so a simple .EXE file can be register as windows services. You can directly use that Exe file and execute it using Shell command. Regards Rushi

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups