Last post Oct 18, 2013 11:17 AM by l.laxmikant
Oct 18, 2013 09:37 AM|rowter|LINK
I created a WCF service and hosted it in a Windows Service. I installed the windows Service using InstallUtil on my local PC.
If i have to comnsume it from a web application how do iadd the reference? How can i consume this service?
When i try to add service reference : net.tcp://localhost:8731/Design_Time_Addresses/WCFJobsLibrary/Jobs
I get the following errors:
Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:8731/Design_Time_Addresses/WCFJobsLibrary/Jobs/'.
Could not connect to net.tcp://localhost:8731/Design_Time_Addresses/WCFJobsLibrary/Jobs/. The connection attempt lasted for a time span of 00:00:02.0010000. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:8731.
No connection could be made because the target machine actively refused it 127.0.0.1:8731
If the service is defined in the current solution, try building the solution and adding the service reference again.
<endpoint address="" binding="netTcpBinding" bindingConfiguration=""
<dns value="localhost" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<add baseAddress="net.tcp://localhost:8731/Design_Time_Addresses/WCFJobsLibrary/Jobs/" />
<serviceMetadata httpGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="false" />
Oct 18, 2013 11:17 AM|l.laxmikant|LINK
you are using mexHttpBinding, for netTcpBinding you have to use mexTcpBinding. Make sure you install your Windows Service with Administrative rights.
for more details on
hosting wcf service in windows service