Hi experts.
I have created a WCF Service using VS 2008. The dll is created successfully and then in New Project I add that dll with Start and Stop methods and add Installer as guided in WCF Tutorial.
The exe is created successfully and I have installed that exe as service. All goes wll. Now to consume that service, in New Project I tried to Add Service Reference. For that I pasted the base address but Service was discovered although it was running in background (I saw in Control Panel->Services).
The error was :
Metadata contains a reference that cannot be resolved: 'net.tcp://192.168.1.201:8081/Design_Time_Addresses/WCFJobsLibrary/Jobs/'.
Could not connect to net.tcp://192.168.1.201:8081/Design_Time_Addresses/WCFJobsLibrary/Jobs/. The connection attempt lasted for a time span of 00:00:01.0625000. TCP error code 10061: No connection could be made because the target machine actively refused it 192.168.1.201:8081.
No connection could be made because the target machine actively refused it 192.168.1.201:8081
If the service is defined in the current solution, try building the solution and adding the service reference again.
my App.config file is as follows
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<system.serviceModel>
<services>
<service behaviorConfiguration="WCFJobsLibrary.JobsBehavior"
name="WCFJobsLibrary.Jobs">
<endpoint address="net.tcp://192.168.1.201:8081/Design_Time_Addresses/WCFJobsLibrary/Jobs/" binding="netTcpBinding" bindingConfiguration="Binding1" contract="WCFJobsLibrary.IJobs">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="net.tcp://192.168.1.201:8081/Design_Time_Addresses/WCFJobsLibrary/Jobs/mex" binding="mexTcpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://192.168.1.201:8081/Design_Time_Addresses/WCFJobsLibrary/Jobs/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WCFJobsLibrary.JobsBehavior">
<serviceMetadata httpGetEnabled="true" httpGetUrl="http://192.168.1.201:8080"/>
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<netTcpBinding >
<binding name="Binding1"
closeTimeout="00:10:00"
openTimeout="00:10:00"
receiveTimeout="00:10:00"
sendTimeout="00:01:00"
transactionFlow="false"
transferMode="Buffered"
transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard"
listenBacklog="10"
maxBufferPoolSize="524288"
maxBufferSize="65536"
maxConnections="10"
maxReceivedMessageSize="65536" portSharingEnabled="false">
<readerQuotas maxDepth="32"
maxStringContentLength="8192"
maxArrayLength="16384"
maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
<reliableSession ordered="true"
inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Transport">
<transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
</security>
</binding>
</netTcpBinding>
</bindings>
</system.serviceModel>
</configuration>
If test client is running it discovers the service but when not running it says above error ..
Any ideas ..? Help
:)