locked
WCF Windows Services RRS feed

  • Question

  • Hi

      I have a requirement in my project where i need to create a windows service which will be running in the background.
      I have few questions related to the windows Service

      1. If i create a WCF Windows Service and install it in Services. Is it possible to access this service from Web Application which is running outside the network or remote??

     2. My Windows Service should check the Database for particular table to see if there are any inserts or updates?? If so need to load that and send the details as mail to respective user. (What is the good approach to find if there is an insert or update for a table??
    I think trigger would not be the best approach since it will slow down the performance.. Let me know if you can suggest a better approach or other solutions for this problem.. 

     I can understand that the question number 2 is kind of MSMQ technology.. But still i am not clear on how to utilize MSQM with WCF??

     In case if i do self hosting for my WCF Windows Service what would be endpoints to consume the WCF from wen application.
      
     
     
     
    Monday, March 1, 2010 10:12 PM

Answers

  • Hi,

    For Part 2, you can also take a look at SQL Cache dependency. I believe it does what you want to do.

    For Part 1, I am not sure what you are trying to do. But if it helps, you can host a WCF Service through a windows service

    http://msdn.microsoft.com/en-us/library/bb332338.aspx

    This article gives you a good background of the hosting options.


    HTH
    Technocrat_aspire
    • Marked as answer by Riquel_Dong Tuesday, March 9, 2010 9:05 AM
    Tuesday, March 2, 2010 2:34 AM

  • Answer to your first quesion- Yes, it can be accessed outside of network, provided firewall in network is configured to allow traffic to that machine and port.
    • Marked as answer by Riquel_Dong Tuesday, March 9, 2010 9:05 AM
    Tuesday, March 2, 2010 5:26 AM
  • go through this
    http://www.dotnetfunda.com/articles/article777-wcf-hosting-in-windows-services-.aspx
    • Marked as answer by Riquel_Dong Tuesday, March 9, 2010 9:05 AM
    Tuesday, March 2, 2010 10:32 AM

All replies

  • Hi,

    For Part 2, you can also take a look at SQL Cache dependency. I believe it does what you want to do.

    For Part 1, I am not sure what you are trying to do. But if it helps, you can host a WCF Service through a windows service

    http://msdn.microsoft.com/en-us/library/bb332338.aspx

    This article gives you a good background of the hosting options.


    HTH
    Technocrat_aspire
    • Marked as answer by Riquel_Dong Tuesday, March 9, 2010 9:05 AM
    Tuesday, March 2, 2010 2:34 AM

  • Answer to your first quesion- Yes, it can be accessed outside of network, provided firewall in network is configured to allow traffic to that machine and port.
    • Marked as answer by Riquel_Dong Tuesday, March 9, 2010 9:05 AM
    Tuesday, March 2, 2010 5:26 AM
  • go through this
    http://www.dotnetfunda.com/articles/article777-wcf-hosting-in-windows-services-.aspx
    • Marked as answer by Riquel_Dong Tuesday, March 9, 2010 9:05 AM
    Tuesday, March 2, 2010 10:32 AM