none
WCF service cannot communicate with client on localhost RRS feed

  • Question

  • Hi,

    I have created a wcf service(Net.TCP) and Windows 8.1 client on Windows 10 machine.

    Service communicates with client without any issues.

    I copy the client and WCF service apps to WINRT machine (Target)

    I get a 10060 error when client calls a WCF service method.

    Checked firewall and required windows services on the target machine and no issues found.

    What could be an issue?



    App.config file:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
     <system.web>
      <compilation debug="true" />
      <membership defaultProvider="ClientAuthenticationMembershipProvider">
       <providers>
        <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
       </providers>
      </membership>
      <roleManager defaultProvider="ClientRoleProvider" enabled="true">
       <providers>
        <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
       </providers>
      </roleManager>
     </system.web>
        <system.serviceModel>
            <bindings>
                <netTcpBinding>
                    <binding name="NewBinding0">
         <security mode="None" >
          </security>
                    </binding>
                </netTcpBinding>
            </bindings>
           
            <services>
                <service behaviorConfiguration="NewBehavior0" name="ClassLibraryWCF.HelloService">
                    <endpoint address="" binding="netTcpBinding" bindingConfiguration="NewBinding0" contract="ClassLibraryWCF.IHelloService">
                        <identity>
                            <dns value="localhost" />
                        </identity>
                    </endpoint>
        <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" contract="IMetadataExchange"/>
        <host>
                        <baseAddresses>
          <add baseAddress="Http://localhost:8005/ClassLibraryWCF/"/>
          <add baseAddress="net.tcp://localhost:8006/ClassLibraryWCF/" />
                        </baseAddresses>
                    </host>
                </service>
            </services>
      <behaviors>
       <serviceBehaviors>
        <behavior name="NewBehavior0">
         <serviceDebug includeExceptionDetailInFaults="true" />
         <serviceMetadata/>
        </behavior>
       </serviceBehaviors>
      </behaviors>
        </system.serviceModel>
    </configuration>
    Monday, August 19, 2019 7:37 AM

All replies

  • Hi,

    How do you ensure that the service works properly after you migrate the project to new machine? Can you test if the service works properly by using WcfTestClient?
    There might something wrong with the process of hosting the service, such as, the below windows feature should be enabled.
    https://i.stack.imgur.com/kF6IC.png

    https://i.stack.imgur.com/OdcUU.png

    Besides, we had better close the windows firewall when WCF based on NetTcpBinding is used.
    Feel free to let me know if the problem still exists.
    Best Regards
    Abraham

    Tuesday, August 20, 2019 2:09 AM
    Moderator