I have a WCF in VB which is to be hosted in a Windows Service. I managed the install program so the service actually installs. But, when I try to start the service, I get the following error:
The service on Local Computer started
and then stopped. Some services stop
automatically if they have no work to
do, for example, the Performance Logs
and Alerts service.
Cheking the Event Viewer gives me the following:
Service cannot be started.
System.ArgumentException: ServiceHost
only supports class service types.
at
System.ServiceModel.Description.ServiceDescription.GetService(Type
serviceType)
at
System.ServiceModel.ServiceHost.CreateDescription(IDictionary`2&
implementedContracts)………
Anybody have any ideas what’s going on? Thanks!
The ServiceHost constructor must be concrete implementation of service contract.
It sounds like you are passing in the Interface rather than the service implementation.