locked
Trouble With Hosting Scenario and Authentication Choices RRS feed

  • Question

  • I'm working on an application that exposes services on both clients and the server.  The client exposes a service host that allows various remote control operations, such as sending files, restarting, or running programs.  It also has a timer heartbeat process that connects to a service on the server.  The server exposes a service host that provides the heartbeat checkin, as well as version control for the client program.

     

    My protocol of choice is net.tcp using standard windows authentication.  The client computers are a mix of domain and workgroup computers.

     

    When I host the client application in a windows form application, with the service host running on a seperate thread, and the main window being used to provide information like "last heartbeat" and "last command received", everything works fine, on both domain and workgroup computers.

     

    When I attempt to host the client application in a windows service, I run into various issues.  The service fails to start if the service is set to run as Local Service or Network Service because it uses some WMI stuff to pull down system information on start.  If I start the service as a specific account, the service starts and receives commands, but does nothing.  If I start the service as Local System, it will not receive commands unless I set the Security.Mode on the NetTcpBinding to None and it will not accept commands unless I allow the service to interact with the desktop.

     

    I suppose what I'm ultimately asking is - are there any inherent problems with hosting the client application in the windows forms application as it is currently working, given that the service host is running on a seperate thread from the UI thread and that I find the ability to see information such as "last heartbeat" or "last command" useful?  The only downside that I can think of is that the SCM will automatically log service problems and restart a failed service and I will be missing out on this ability.

     

    Thanks in advance!

    Sunday, June 8, 2008 1:29 AM