Click here to Skip to main content
13,053,399 members (61,108 online)
Rate this:
Please Sign up or sign in to vote.
See more:

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:
        <binding name="tcpBinding" transferMode="Streamed" portSharingEnabled="false">
          <reliableSession enabled="true" />
          <security mode="None">
            <transport clientCredentialType="Windows" protectionLevel="None" />
            <message clientCredentialType="Windows" />
      <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" />
            <add baseAddress="net.tcp://localhost:6001/CzService_Server" />
        <behavior name="Server_Product">
          <serviceThrottling maxConcurrentCalls="1000" maxConcurrentSessions="1000" />
          <serviceMetadata httpGetEnabled="false" />
          <serviceDebug includeExceptionDetailInFaults="false" />

Client Config

        <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" />
      <endpoint address="net.tcp://"
          binding="netTcpBinding" bindingConfiguration="NetTcpBinding_CzService_IServerServiceChannel_Product"
          <servicePrincipalName value="host/primusitr-555" />

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

1 solution

Rate this: bad
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' 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.
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 5 Oct 2012
Copyright © CodeProject, 1999-2017
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