Do you have config file for the host?
Config file has to have to format
You wrote on Fri, 23 Mar 2007 11:39:23 -0700:
KB> I get the following exception when I am starting (webservice.Open())
KB> a WCF
KB> service. I have put the same service in a console host and in an IIS
KB> with no problem. Any ideas what I can change to successfully host in
KB> service? Inside the OnStart method I change the directory from
KB> C:\Windows\System32 to the installation directory so that the
KB> file can be found. I don't know if that is the source of my problem
KB> or not. I
KB> change the directory using Environment.CurrentDirectory = path and I
KB> do this
KB> before the service is Open. I assume that the configuration file
KB> will be used
KB> on Open?
1::11:10 PM - Exception
KB> System.InvalidOperationException: Service
KB> has zero application (non-infrastructure) endpoints. This might be
KB> because no
KB> configuration file was found for your application, or because no
KB> element matching the service name could be found in the
KB> configuration file,
KB> or because no endpoints were defined in the service element.
KB> EnsureThereAreNonMexEndpoints(ServiceDescription description)
KB> InitializeServiceHost(ServiceDescription description,
KB> ServiceHostBase serviceHost)
KB> at System.ServiceModel.ServiceHostBase.InitializeRuntime()
KB> at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
KB> at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan
KB> at System.ServiceModel.Channels.CommunicationObject.Open()
KB> at X.Host.WebServiceHostService.ServiceWorkerMethod().
With best regards, Vadym Stetsyak.