Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to access WCF Service from Client machine
    primarykey
    data
    text
    <p>Unable to access WCF Service from Client machine</p> <ul> <li>I have three projects : WCF Service (VS-2008), Windows Service (VS-2008), Client (VS-2005)</li> <li>The WCF service has netTcpBinding</li> <li>This service is hosted as a windows service and not on IIS</li> </ul> <p>The base address for both the service (WCF and Windows) is </p> <pre><code>net.tcp://localhost:8010/WCFService.Service1/ </code></pre> <p>Now when i add a service reference to the client project which is on VS-2005, It updates my app.config file</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;configuration&gt; &lt;system.serviceModel&gt; &lt;bindings&gt; &lt;netTcpBinding&gt; &lt;binding name="netTcpEndPoint" closeTimeout="00:01:00" openTimeout="00:01: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"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt; &lt;reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /&gt; &lt;security mode="Transport"&gt; &lt;transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" /&gt; &lt;message clientCredentialType="Windows" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/netTcpBinding&gt; &lt;/bindings&gt; &lt;client&gt; &lt;endpoint address="net.tcp://localhost:8010/WCFService.Service1/" binding="netTcpBinding" bindingConfiguration="netTcpEndPoint" contract="Client.Service1.IService1" name="netTcpEndPoint"&gt; &lt;identity&gt; &lt;servicePrincipalName value="host/server17.domain.com" /&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;/client&gt; &lt;/system.serviceModel&gt; &lt;/configuration&gt; </code></pre> <p>And adds Service1.map file as</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;ServiceReference&gt; &lt;ProxyGenerationParameters ServiceReferenceUri="net.tcp://server17:8010/WCFService.Service1/" Name="Service1" NotifyPropertyChange="False" UseObservableCollection="False"&gt; &lt;/ProxyGenerationParameters&gt; &lt;EndPoints&gt; &lt;EndPoint Address="net.tcp://localhost:8010/WCFService.Service1/" BindingConfiguration="netTcpEndPoint" Contract="Client.Service1.IService1" &gt; &lt;/EndPoint&gt; &lt;/EndPoints&gt; &lt;/ServiceReference&gt; </code></pre> <p>When I call any of the service methods I get an error stating</p> <blockquote> <p>Could not connect to net.tcp://localhost:8010/WCFService.Service1/. The connection attempt lasted for a time span of 00:00:02.0063936. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:8010.</p> </blockquote> <p>At least it should be <code>net.tcp://server17:8010/WCFService.Service1/</code></p> <p>I have already tried to replace <code>localhost</code> with <code>server17</code> in the client project... but no luck</p> <p>What should I change to make it working? please help.</p> <blockquote> <p>This is my WCF Service's App.config which is same as windows service's app.config : as requested by Tim</p> </blockquote> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;configuration&gt; &lt;system.web&gt; &lt;compilation debug="true" /&gt; &lt;/system.web&gt; &lt;system.serviceModel&gt; &lt;services&gt; &lt;service behaviorConfiguration="WCFService.ServiceBehavior" name="WCFService.Service1"&gt; &lt;endpoint address="" binding="netTcpBinding" bindingConfiguration="" name="netTcpEndPoint" contract="WCFService.IService1" /&gt; &lt;endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" name="mexTcpEndPoint" contract="IMetadataExchange" /&gt; &lt;host&gt; &lt;baseAddresses&gt; &lt;add baseAddress="net.tcp://localhost:8010/WCFService.Service1/" /&gt; &lt;/baseAddresses&gt; &lt;/host&gt; &lt;/service&gt; &lt;/services&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="WCFService.ServiceBehavior"&gt; &lt;serviceMetadata httpGetEnabled="False" /&gt; &lt;serviceDebug includeExceptionDetailInFaults="False" /&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;/system.serviceModel&gt; &lt;/configuration&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload