How to use WCF Dual Service over the Internet?

I followed this tutorial (at least founded my WCF in this, because I need to work the same way then): http://www.eggheadcafe.com/tutorials/wcf/b5ada8df-58c5-492f-b368-457b3a4f137c/ notify-client-applications-using-wcf-callbacks.aspx

It works very well on my computer, but I need to use it over the Internet. When I tried to do this, I heard (over the Internet) that it is better to use netTcpBiding.

I will have a server that will know about the number of clients on the Internet. I need a WFC service on my IIS on the server, and a Windows service that consumes it and notifies it. I need a callback because the server will someday have to execute some commands on the client.

I would be very happy if someone could help me.

Thanks in advance,

Edit:

As I understand it: I just could not get it to work through the Internet. Can you guys show me how I can change my settings (Web.config e App.config) to use netTcpBinding and work over the Internet?

Thanks again,

Edit 2:

My Web.config in my WCFServiceApplication utility:

<?xml version="1.0"?>
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <bindings>
      <wsDualHttpBinding>
        <binding name="WSDualHttpBinding_IPCWatcherWCFService" closeTimeout="00:01:00"
            openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
            bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
            maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
            messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00" />
          <security mode="Message">
            <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" />
          </security>
        </binding>
      </wsDualHttpBinding>
    </bindings>
    <services>
      <service behaviorConfiguration="TiT.PCWatcher.Server.WCFService.Services.PCWatcherWCFServiceBehavior" name="TiT.PCWatcher.Server.WCFService.Services.PCWatcherWCFService">
        <endpoint address="" binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_IPCWatcherWCFService" contract="TiT.PCWatcher.Server.WCFService.Interfaces.IPCWatcherWCFService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="TiT.PCWatcher.Server.WCFService.Services.PCWatcherWCFServiceBehavior">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
</configuration>

My App.config in my WindowsService:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <bindings>
      <wsDualHttpBinding>
        <binding name="WSDualHttpBinding_IPCWatcherWCFService" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
          maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text"
          textEncoding="utf-8" useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00" />
          <security mode="Message">
            <message clientCredentialType="Windows" negotiateServiceCredential="true"
              algorithmSuite="Default" />
          </security>
        </binding>
      </wsDualHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:25145/Services/PCWatcherWCFService.svc"
        binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_IPCWatcherWCFService"
        contract="PCWatcherWCFServiceReference.IPCWatcherWCFService"
        name="WSDualHttpBinding_IPCWatcherWCFService">
        <identity>
          <dns value="localhost" />
        </identity>
      </endpoint>
    </client>
  </system.serviceModel>
</configuration>

A simple change to netTcpBinding does not work ...

But I would be glad if I could run this over the Internet ... I published WCFService in IIS. References:

https://www2.tcenter.com.br/monitor/PCWatcherWCFService.svc

OR

http://www2.tcenter.com.br:8080/monitor/PCWatcherWCFService.svc

Just changing the configuration is enough for it to work over the Internet? as i said local it works just fine.

, URL , , ...

, WPF. , cenario...

, DualHttpBinding, , , , , ? , - ?! ( , )

,

21/06/2012:

. netTcpBinding . . . DoubleCommunicationTest.

, , cenarion . . , netTcpBinding . . .

... :

, .

, , netTcpBinding, . ( , Clunky Coder , , net.tcp IIS .., ., , netTcp.)

, , . , .

+5
2

netTcpBinding ( ), , WSDualHttpBinding, HTTP. netTcpBinding , , , , netTcpBinding ( ) . - , , , . ( netTcp it TCP 808) ( ), , - netTcpBinding . , , - , ​​ .

WSDualHttpBinding, Silverlight (Silverlight WSDualHttpBinding) PollingDuplexHttpBinding.

this.

EDIT:

netTcpBinding, , netTcpBinding WSDualHttpBinding. , , , , netTcpBinding .

20/06/2012:

: . , , , (Web.config e App.config) netTcpBinding ?

, netTcpBinding , , IIS . , IIS , . - IIS. , .svc, , App.Config(Service config file) web.config( , App.config), <host><baseAddresses> web.config, . , , - , , , netTcpBinding : - → " ..." → "...", net.tcp . " " net.tcp, netTcpBinding, , http,net.tcp . , , ( - -) , .

, this this, , , .

21/06/2012:

IIS, , HTTP, nettcp, , . - , ( , ), WSDualHttpBinding, HTTP , , netTcpBinding. , , IIS ( ):

  • DefaultWebsite IIS, , , "" , URL-. ASP.NET 4.0.

  • , .svc ; :

C:\Users\MyPC\Documents\DualCommunicationTest.Server\WcfServiceApp

  • , HTTP 80 , 8085, . IP 192.168.1.4 , 80 ( , , , 8085), 192.168.1.4.

.

+5

TCP , TCP . HTTP - , . , dualHttpBinding. WCF HTTP- , .

HTTP. , NAT, , , HTTP-, HTTP-.

, TCP. , , , , ( ), . , .

+1

All Articles