Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 773347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:56:57+00:00 2026-05-14T18:56:57+00:00

I have a WCF Service Library containing five service contracts. The library is hosted

  • 0

I have a WCF Service Library containing five service contracts. The library is hosted through a Windows Service. Most if not all my configuration for the WCF Library is declaritive. The only thing I am doing in code for configuration is to pass the type of the class implementing the service contracts into ServiceHost. I then call Open on each of the services during the Windows Service OnStart event. Here is the error message I get:

Service cannot be started. System.InvalidOperationException: Service ‘[Fubu.Conversion.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 Fubu.RemotingHost.RemotingHost.StartServ…

    protected override void OnStart(string[] args)
    {
        // Uncomment to debug this properly
        //System.Diagnostics.Debugger.Break();
        StartService1();
        StartService2();
        StartService3();
        StartService4();
        StartService5();
    }

Each of the above simply do the following:

    private void StartSecurityService()
    {
        host = new ServiceHost(typeof(Service1));
        host.Open();
    }

Service Lib app.congfig summary

<services>
  <service behaviorConfiguration="DefaultServiceBehavior" name="Fubu.Conversion.Service1">
    <endpoint address="" binding="netTcpBinding" bindingConfiguration="TCPBindingConfig"
      name="Service1" bindingName="TCPEndPoint" contract="Fubu.Conversion.IService1">
      <identity>
        <dns value="localhost" />
      </identity>
    </endpoint>
    <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
      name="mexSecurity" bindingName="TcpMetaData" contract="IMetadataExchange" />
    <host>
      <baseAddresses>
        <add baseAddress="net.tcp://localhost:8025/Fubu/Conversion/Service1/" />
      </baseAddresses>
    </host>
  </service>

…

Contract is set up as follows:
namespace Fubu.Conversion.Service1
{

[ServiceContract(Namespace = "net.tcp://localhost:8025/Fubu")]
public interface IService1
{

I have looked “high and low” for a solution without any luck. Is the answer obvious? The solution to this does not appear to be. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T18:56:57+00:00Added an answer on May 14, 2026 at 6:56 pm

    And the reason is painfully simple!!!!
    As I noted in the explanation in the question, I have a WCF Service Library being hosted within a Windows Service. I had incorrectly defined and located the app.config file within the WCF Service Library project. I ensured the app.config file always outputted to the bin folder on builds. Once I relocated or copied this config file to the Windows Service project the problem was solved and the services all 5 of them started correctly. One other point of note is to ensure the endpoints defined for the individual services are utilizing unique ports.

    And the moral of the story:
    “Make sure you define and locate the app.config file within the project that will host your service library.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.