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. WCF and WF
  4. WCF to trigger a event in Windows Service

WCF to trigger a event in Windows Service

Scheduled Pinned Locked Moved WCF and WF
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
    M J Jaya Chitra
    wrote on last edited by
    #1

    Dear All, I have a windows service, to which the user can communicate and the communication is logged in a datatable in windows service. For the communication I have used WCF and the implementation of the service contact interface is done in the Windows Service class itself. While testing I have found the below: 1. The service host is started and the communication is well established. 2. When the communication function is called I have observed that all the instance variables in the Windows Service class is null or with default value. Can any one tell me whether I can notify the Windows service when a data is received by the Service Contract hosted in the Windows Service? Or, can we have the value persistance in the Service contract as using the data in the data table only I need to check whether the data given is unique or duplicated.

    Best Regards, M. J. Jaya Chitra

    M A 2 Replies Last reply
    0
    • M M J Jaya Chitra

      Dear All, I have a windows service, to which the user can communicate and the communication is logged in a datatable in windows service. For the communication I have used WCF and the implementation of the service contact interface is done in the Windows Service class itself. While testing I have found the below: 1. The service host is started and the communication is well established. 2. When the communication function is called I have observed that all the instance variables in the Windows Service class is null or with default value. Can any one tell me whether I can notify the Windows service when a data is received by the Service Contract hosted in the Windows Service? Or, can we have the value persistance in the Service contract as using the data in the data table only I need to check whether the data given is unique or duplicated.

      Best Regards, M. J. Jaya Chitra

      M Offline
      M Offline
      M J Jaya Chitra
      wrote on last edited by
      #2

      Dear All, I got the answer from the reply of "Brian Griggs" for the post "Events from ServiceHost instance ?". Thanks a lot.

      Best Regards, M. J. Jaya Chitra

      1 Reply Last reply
      0
      • M M J Jaya Chitra

        Dear All, I have a windows service, to which the user can communicate and the communication is logged in a datatable in windows service. For the communication I have used WCF and the implementation of the service contact interface is done in the Windows Service class itself. While testing I have found the below: 1. The service host is started and the communication is well established. 2. When the communication function is called I have observed that all the instance variables in the Windows Service class is null or with default value. Can any one tell me whether I can notify the Windows service when a data is received by the Service Contract hosted in the Windows Service? Or, can we have the value persistance in the Service contract as using the data in the data table only I need to check whether the data given is unique or duplicated.

        Best Regards, M. J. Jaya Chitra

        A Offline
        A Offline
        Ashwin Shetty
        wrote on last edited by
        #3

        You can do it by using Events. Place the dll or class on which you have your Contract is implemented in same application domain. Class / Dll should have public event with args which need to transfer to your service to process. Bind the event in the service which shall let your service know about the request. We have used same method to communicate with window service. let me know if you need further help, you can mail me at ashwin.shetty@eclerx.com.

        ashwin shetty

        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