.NET Framework Developer Center > .NET Development Forums > .NET StockTrader Sample Application > Sample needed: Configuration Service for WCF hosted on Windows Service
Ask a questionAsk a question
 

QuestionSample needed: Configuration Service for WCF hosted on Windows Service

  • Tuesday, November 03, 2009 6:57 PMjkno Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Is there any working sample for Configuration Service for WCF hosted on Windows Service? Thanls!

All Replies

  • Wednesday, November 04, 2009 5:22 PMGregory Leake Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    The Configuration Service does support a hosting mode of Windows Service (NT Service); but no sample is provided.  Basically, very similar to the other modes of hosting.  Using Repository Create tool, you will notice an option for hosting via  a Windows Service.  This generates the stub Windows Service, and you use this in a similar way to when choosing Windows forms hosting or Console App hosting; just making sure you add the correct generated stub code for the Windows Service to your project.  See if this makes sense once you read the step-by-step tutorial for Config Service; you can substitute Windows Service for the Windows Host (.NET forms app) hosting logic in this tutorial, the names of the .cs files generated should make it pretty clear what stub code is generated for the Windows NT Service; then create a Windows NT Service project from Visual Studio instead of a .NET Windows App.  If you have issues/need any help, let me know.  But it is all tested working...

    -Greg
    Greg Leake, Microsoft
  • Thursday, November 05, 2009 4:54 PMjkno Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Do you mind create one for reference?