Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# WCF Services
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:
"<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
 
<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 5-Oct-12 2:17am
Edited 5-Oct-12 2:56am
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
Member 4386227 at 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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 886
1 OriginalGriff 390
2 CPallini 255
3 Volynsky Alex 205
4 Richard Deeming 175
0 OriginalGriff 5,540
1 Sergey Alexandrovich Kryukov 4,668
2 CPallini 4,540
3 George Jonsson 3,102
4 Gihan Liyanage 2,445


Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 5 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100