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. State signalling from windows services

State signalling from windows services

Scheduled Pinned Locked Moved C#
csharpquestion
3 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.
  • M Offline
    M Offline
    minnie mouse
    wrote on last edited by
    #1

    Happy New Year ! to all. :) Just wondering if someone would give me a bit of guidance on this. I need to signal various points of code execution from a windows service to a monitoring application on the same machine. This is apart from those handled by "Service controller class". I have had a look at tcp sockets, .net remoting and named pipes, but that all seems like overkill. As i am simply looking for a boolean flag, no messages or data transfer as such. Has anyone found a simple way of doing this,i know i must be missing something ? Thanks in advance.

    J 1 Reply Last reply
    0
    • M minnie mouse

      Happy New Year ! to all. :) Just wondering if someone would give me a bit of guidance on this. I need to signal various points of code execution from a windows service to a monitoring application on the same machine. This is apart from those handled by "Service controller class". I have had a look at tcp sockets, .net remoting and named pipes, but that all seems like overkill. As i am simply looking for a boolean flag, no messages or data transfer as such. Has anyone found a simple way of doing this,i know i must be missing something ? Thanks in advance.

      J Offline
      J Offline
      Jimmanuel
      wrote on last edited by
      #2

      IPC generally isn't a simple thing. If you want to signal state from one process to another then you have to send some sort of message but it doesn't have to be a big one. Two simpler options than the ones you listed are shared file IO (see the System.IO[^] namespace) and MSMQ (see the MessageQueue[^] class). If you want quick and easy, I suggest you look into the MSMQ option; it boils down to just a few lines of code for both sending and receiving messages. :badger:

      M 1 Reply Last reply
      0
      • J Jimmanuel

        IPC generally isn't a simple thing. If you want to signal state from one process to another then you have to send some sort of message but it doesn't have to be a big one. Two simpler options than the ones you listed are shared file IO (see the System.IO[^] namespace) and MSMQ (see the MessageQueue[^] class). If you want quick and easy, I suggest you look into the MSMQ option; it boils down to just a few lines of code for both sending and receiving messages. :badger:

        M Offline
        M Offline
        minnie mouse
        wrote on last edited by
        #3

        Thanks for that, i will investigate the message queue alternative i think. I had thought about using an XML file but it seems like that could introduce possible problems. It is reliability i am after.

        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