WCF hosted in windows service errors?

The ServiceHost constructor must be concrete implementation of service contract.

Up vote 0 down vote favorite share g+ share fb share tw.

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!

Windows wcf service host link|improve this question edited May 11 '11 at 4:57marc_s176k14142283 asked May 10 '11 at 23:58Jason633112 100% accept rate.

The ServiceHost constructor must be concrete implementation of service contract. It sounds like you are passing in the Interface rather than the service implementation.

I have absolutely no idea what you're talking about. Do you mean the install program? – Jason May 11 '11 at 15:44.

Svh = new ServiceHost(typeof(MCWCFService. MCManagementService)); svh. AddServiceEndpoint( typeof(MCWCFService.

IMCManagementService), new NetTcpBinding(), "net. Tcp://192.168.0.2:8011"); svh.Open(); When creating the ServiceHost use the Class name - in the above it is MCManagementService. In the endpoint, use the interface - in the above it is IMCManagementService.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions