Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am hosting WCF service as network service in Services.msc. I am trying to access that service from Client which is on remote machine. Both machines are in Work group. If both machines are in Domain i am able to access the service from client. But in work group I am not able to connect to service from client. Below are my both Config files.

Service Config:
HTML
"<bindings>
      <netTcpBinding>
        <binding name="tcpBinding" transferMode="Streamed" portSharingEnabled="false">
          <reliableSession enabled="true" />
          <security mode="None">
            <transport clientCredentialType="Windows" protectionLevel="None" />
            <message clientCredentialType="Windows" />
          </security>
        </binding>
      </netTcpBinding>
    </bindings>
    <services>
      <service behaviorConfiguration="Server_Product" name="CzService.Channel.ServerChannel.CzService_ServerServiceChannel_Product">
        <endpoint binding="netTcpBinding" bindingConfiguration="" contract="CzService.Channel.IServerChannel.CzService_IServerServiceChannel_Product" />
        <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
          contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="net.tcp://localhost:6001/CzService_Server" />
          </baseAddresses>
        </host>
      </service>
</Services>
<behaviors>
      <serviceBehaviors>
        <behavior name="Server_Product">
          <serviceThrottling maxConcurrentCalls="1000" maxConcurrentSessions="1000" />
          <serviceMetadata httpGetEnabled="false" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
</behaviours>"



Client Config

HTML
<bindings>
      <netTcpBinding>
        <binding name="NetTcpBinding_CzService_IServerServiceChannel_Product"
            closeTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="00:10:00"
            sendTimeout="00:05:00" transactionFlow="false" transferMode="Buffered"
            transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard"
            listenBacklog="10" maxBufferPoolSize="20000000" maxBufferSize="20000000"
            maxConnections="10" maxReceivedMessageSize="20000000">
          <readerQuotas maxDepth="32" maxStringContentLength="20000000"
              maxArrayLength="20000000" maxBytesPerRead="10000" maxNameTableCharCount="20000000" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00"
              enabled="false" />
          <security mode="None">
            <transport clientCredentialType="None" protectionLevel="None" />
            <message clientCredentialType="None" />
          </security>
        </binding>
</bindings>

<client>
      <endpoint address="net.tcp://192.168.19.182:6001/CzService_Server"
          binding="netTcpBinding" bindingConfiguration="NetTcpBinding_CzService_IServerServiceChannel_Product"
          contract="CzService_Server_Security.CzService_IServerServiceChannel_Product"
          name="NetTcpBinding_CzService_IServerServiceChannel_Product">
        <identity>
          <servicePrincipalName value="host/primusitr-555" />
        </identity>
      </endpoint>
</Client>



Please help me out on this. Thank you.
Posted
Updated 5-Oct-12 2:56am
v2

1 solution

Your server address is a LAN IP. If you aren't on the same network, that location simply won't be accessible. (To confirm that, try 'ping 192.168.19.182' on a command line.) I'm not quite sure what you mean by 'domain' and 'workgroup' in this context, as neither of them is relevant to TCP, but if 'domain' means 'the same company network' then that would be the problem. You would need to give the server an externally visible DNS name and appropriate firewall permissions, or alternatively specify that the client will only work when VPN'd into the same network as the server.
 
Share this answer
 
Comments
Member 4386227 8-Oct-12 0:04am    
Thank you for your reply. I am able to ping the service machine remotely and both the systems are on same network. I am trying to connect the service from client which is in same network. But, still not able to connect. Only difference between domain and workgroup is Domain user can login to all the machiens in that network and workgroup user can login to only that computer where that user is created.But both are on same network.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900