I created one sample windows service and installed my service with successfully. But while going to START the service. I am getting below error.
This sevice on local computer started and then stopped. some serivces stop automatically if then are not in use by other serives or programs
My config file Code:
<system.serviceModel>
<services>
<service name="SvcClient.WCFJobsLibrary.Service1">
<endpoint address="" binding="wsHttpBinding" contract="WCFJobsLibrary.IService1">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8732/Design_Time_Addresses/WCFJobsLibrary/Service1/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="True"/>
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
Can any one please suggest me... Thanks in adv.
You need to specify the endpoint of the service (the URI at which the service can be reached by the client).
You can do it in the code where you instantiate the ServiceHost
(a very generic example):
ServiceHost myHost = new ServiceHost(typeof(TechResponse), new Uri("http://www.somedomain.com/TechResponse"));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With