endpoint.tv Screencast - Hosting WCF Services in Windows Services

Sign in to queue

The Discussion

  • User profile image

    good video..

  • User profile image

    good explanation and thanks for ur video tutorials. which is helpfull for me very much......

  • User profile image
    anurag pal

    Good explanation  and nice tutorials for beginners.thanks for uploading this video for free use.

  • User profile image

    I have been doing the video tutorial on WCF. However, on trying to start the service on EvalServiceHost in Services, i get the following error
    "Error 1053: The service did not respond to the start or control request in a timely fashion"

  • User profile image


    Add System.ServiceModel to bring in the WCF namespaces. Add reference to service project.

    Create a new ServiceHost(typeof(MyService)). Use host.Open() and host.Close() in OnStart and OnStop, respectively.

    Copy app.config from the WCF service library to the Windows service project, possibly editing (e.g. metadata behavior).

    In design view, right-click and "add installer". For 'serviceProcessInstaller', maybe change the account to "LocalSystem" (to register http endpoints with httpsys [whatever that means]).

    Use 'installutil' from the commandline (e.g. installutil WindowServiceHost.exe) to install the service. Then use 'services.msc' snap-in to start/stop/edit windows service. If you start the service, you can browse to the endpoint URL (e.g. http://localhost:8080/evalservice) to see the documentation and WSDL.

Add Your 2 Cents