Service 'WcfHost.Calservref.CalServiceClient' 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
i have created a wcf service and i am trying to host it in a console env and the app .config has all the details but still i get the error
ServiceHost host = new ServiceHost(typeof(CalServiceClient));
host.Open();
Console.WriteLine("Service is Live");
Console.WriteLine("Press enter to stop the hosted service");
Console.ReadLine();
host.Close()
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ICalService" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:12911/CalService.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_ICalService" contract="Calservref.ICalService"
name="BasicHttpBinding_ICalService" />
</client>
<services>
<service name="Calservref.CalService">
<endpoint address="" binding="basicHttpBinding" contract="Calservref.ICalService">
</endpoint>
<!-- This Endpoint is used for genertaing the proxy for the client -->
<!-- To avoid disclosing metadata information, set the value below to false and
remove the metadata endpoint above before deployment -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange">
</endpoint>
<host>
<baseAddresses>
<add baseAddress="http://localhost:12911/CalService.svc"/>
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehaviour">
<serviceMetadata httpGetEnabled="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceMode>