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. Invoking windows service in C# code

Invoking windows service in C# code

Scheduled Pinned Locked Moved C#
csharpquestion
4 Posts 2 Posters 0 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.
  • C Offline
    C Offline
    Charith Jayasundara
    wrote on last edited by
    #1

    Hi, I am going to develop a Windows Service in C#. It will be triggering for every 24hours and I want to invoke it On Demand As well. Can I invoke a windows service on demand???? Thanks & Regards !!!

    jayasshc

    I 1 Reply Last reply
    0
    • C Charith Jayasundara

      Hi, I am going to develop a Windows Service in C#. It will be triggering for every 24hours and I want to invoke it On Demand As well. Can I invoke a windows service on demand???? Thanks & Regards !!!

      jayasshc

      I Offline
      I Offline
      il_masacratore
      wrote on last edited by
      #2

      You can start and stop a windows service using System.ServiceProcess.ServiceController class. You can see here an example: http://www.codeproject.com/csharp/Service_Controller.asp

      Visit my blog at http://dotnetforeveryone.blogspot.com/

      C 2 Replies Last reply
      0
      • I il_masacratore

        You can start and stop a windows service using System.ServiceProcess.ServiceController class. You can see here an example: http://www.codeproject.com/csharp/Service_Controller.asp

        Visit my blog at http://dotnetforeveryone.blogspot.com/

        C Offline
        C Offline
        Charith Jayasundara
        wrote on last edited by
        #3

        Thanks a lot :)

        1 Reply Last reply
        0
        • I il_masacratore

          You can start and stop a windows service using System.ServiceProcess.ServiceController class. You can see here an example: http://www.codeproject.com/csharp/Service_Controller.asp

          Visit my blog at http://dotnetforeveryone.blogspot.com/

          C Offline
          C Offline
          Charith Jayasundara
          wrote on last edited by
          #4

          Hi, Can't I invoke its method without stoping and starting?

          jayasshc

          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