Thank you Marc and Matt for your reply.
Here is snippet from my Windows Service App.config:
<services>
<service behaviorConfiguration="ReportingComponentLibrary.TemplateServiceBehavior"
name="ReportingComponentLibrary.TemplateService">
<endpoint address="ws" binding="wsHttpBinding" contract="ReportingComponentLibrary.ITemplateService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" ></endpoint>
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/ReportingComponentLibrary/TemplateService" />
</baseAddresses>
</host>
</service>
<service behaviorConfiguration="ReportingComponentLibrary.TemplateServiceBehavior"
name="ReportingComponentLibrary.TemplateReportService">
<endpoint address="ws" binding="wsHttpBinding" contract="ReportingComponentLibrary.ITemplateReportService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" ></endpoint>
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/ReportingComponentLibrary/TemplateReportService" />
</baseAddresses>
</host>
</service>
</services>
And I have opened two hosts for these two services as specified by Marc.
But when I try to start my service, it says... 'service started and stopped...'.
I looked into eventvwr for error detail and it says:
Service cannot be started. System.InvalidOperationException: Service 'ReportingComponentLibrary.TemplateReportService' 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.
Any thoughts how I can avoid this error?
Thank you!