How to: Host WCF in a Windows Service Using TCP
- From: "Peter" <czupet@xxxxxxxxxxxxx>
- Date: Thu, 29 Oct 2009 14:37:37 -0500
I am trying to host WCF in a Windows Service, and I have created an example
form http://msdn.microsoft.com/en-us/library/cc949080.aspx#
but I am still getting an error message when I try to start the servrice
What am I doing wrong?
Thank You
Peter
Here's the error:
"The Service1 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"
Here's the error from the Application Event Viewer
Event Type: Error
Event Source: Service1
Event Category: None
Event ID: 0
Date: 10/29/2009
Time: 2:31:35 PM
User: N/A
Computer: DEVCON1
Description:
Service cannot be started. System.InvalidOperationException: Service
'WindowsService1.Service1' has zero application (non-infrastructure)
endpoints. This might be because no configuration file was found for your
application, or because no service element matching the service name could
be found in the configuration file, or because no endpoints were defined in
the service element.
at
System.ServiceModel.Description.DispatcherBuilder.EnsureThereAreNonMexEndpoints(ServiceDescription
description)
at
System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription
description, ServiceHostBase serviceHost)
at System.ServiceModel.ServiceHostBase.InitializeRuntime()
at System.ServiceModel.ServiceHostBase.OnBeginOpen()
at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan
timeout)
at System.ServiceModel.Channels.CommunicationObject.Open()
at WindowsService1.Service1.OnStart(String[] args) in C:\Program
Files\...
.
- Follow-Ups:
- Re: How to: Host WCF in a Windows Service Using TCP
- From: Mr. Arnold
- Re: How to: Host WCF in a Windows Service Using TCP
- Prev by Date: Single Solution to target 64 bit and 32 bit versions?
- Next by Date: Re: Single Solution to target 64 bit and 32 bit versions?
- Previous by thread: Single Solution to target 64 bit and 32 bit versions?
- Next by thread: Re: How to: Host WCF in a Windows Service Using TCP
- Index(es):
Relevant Pages
|