WCF Remote Client Callbacks using wsDualHttpBinding

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lmod

    WCF Remote Client Callbacks using wsDualHttpBinding


    I am developing an application using WPF and WCF. This app on the
    server side will need for WCF services hosted in IIS6 to communicate
    with WCF services that are hosted as Windows services on the same server
    / or network. Also the WCF services hosted in IIS6 has to communicate
    with the WPF client apps that will be installed on computers that are
    not in the same network as the server/s. Right now I am creating small
    test apps so I can figure out how to get everything to play.
    I have sucessfully made calls from WPF to WCF, hit the data store from
    WCF and passed back complex types to WPF with security etc. That part
    works great, however trying to do a client callback is kicking my butt.
    I have walked through several tut's on the net with no sucess. and I
    think I know why. All of the tut's that I have found are client/server
    where the client and the server are on the same network. Another problem
    I have is that my development machine is behind a router (on a different
    network than the server, and this is the same type of environment all of
    the users of this app will have) so when I create the custom binding on
    the client and set the ClientBaseAddre ss (as follows);

    Dim mybinding As WSDualHttpBindi ng = New
    WSDualHttpBindi ng(WSDualHttpSe curityMode.Mess age)
    mybinding.Secur ity.Message.Cli entCredentialTy pe =
    MessageCredenti alType.Certific ate
    mybinding.Secur ity.Message.Neg otiateServiceCr edential = True
    Dim context As InstanceContext = New InstanceContext (New CallBack())
    Dim myHost As String = Dns.GetHostName ()
    Dim ipEntry As IPHostEntry = Dns.GetHostByNa me(myHost)
    Dim add As IPAddress() = ipEntry.Address List
    mybinding.Clien tBaseAddress = New Uri("http://" + add(0).ToString () +
    ":" + "4000" + "/")
    _client = New TCallSvcClient( context)
    _client.Endpoin t.Binding = mybinding

    the address will be a non public IP in the 192.168.x.x range and the
    server cant call the client back with that address. I figured that I may
    try to forward a port in the router config but I could not get that to
    work either. So I have (3) questions:

    1) how do I configure client callbacks using wsDualHttpBindi ng (This is
    the only binding I can use) when the client and server are on different
    networks and the clients will be behind a router?

    2) Is it possible for IIS 6.0 hosted WCF services to communicate with
    Windows hosted WCF services (on the same server / or network) via
    net.tcp binding? (duplex calls here)

    3) Can anyone give or point me to some example implementations of the
    above?

    Oh and right now I receive either a timeout exception (which I think is
    due to te real exception being dropped because of the one way op) or the
    405 method not allowed exception (Fiddler says: the page you are looking
    for cannot be displayed because an invalid method (http verb) was used
    to attempt access.)

    I thank you in advance.


    --
    lmod
  • Mr. Arnold

    #2
    Re: WCF Remote Client Callbacks using wsDualHttpBindi ng


    "lmod" <guest@unknow n-email.comwrote in message
    news:6348c806f1 54ac240d5c9fcb8 d90f430@nntp-gateway.com...
    >
    the address will be a non public IP in the 192.168.x.x range and the
    server cant call the client back with that address. I figured that I may
    try to forward a port in the router config but I could not get that to
    work either. So I have (3) questions:
    I think you would have to port forward 80 HTTP, becuase that is what is
    being used on IIS6 and use TCP 80 in the solution.

    But as far a using a router that can filter out protocols, other than, HTTP
    only allowing HTTP to come down TCP port 80 would be a concern here for me,
    because port 80 is open to all inbound traffic, solicited and unsolicited
    traffic, if the solution is facing the public Internet. I guess it depends
    on the router's capabilities and if the solution was facing the public
    Internet.
    >
    1) how do I configure client callbacks using wsDualHttpBindi ng (This is
    the only binding I can use) when the client and server are on different
    networks and the clients will be behind a router?
    If it's using TCP 80 the HTTP port becuase IIS6 is using TCP port 80, then
    it might work for you.
    >
    2) Is it possible for IIS 6.0 hosted WCF services to communicate with
    Windows hosted WCF services (on the same server / or network) via
    net.tcp binding? (duplex calls here)
    No, IIS 6 does not allow net.tcp, net.pipe or net.msmq binding , only IIS7
    allows that.

    Learn about the tasks necessary to develop and deploy a WCF service that is hosted in IIS, beginning with verifying that component installation


    <copied>

    WCF services hosted in IIS 5.1 and IIS 6.0 are restricted to using
    HTTP-based communication. On these IIS platforms, configuring a hosted
    service to use a non-HTTP binding results in an error during service
    activation. For IIS 7.0, the supported transports include HTTP, Net.TCP,
    Net.Pipe, Net.MSMQ, and msmq.formatname for backwards compatibility with
    existing MSMQ applications.


    Now, if you needed to user Net.TCP in this situation in some kind of
    encrypted communications, then you don't need IIS 6, because you can use a
    ..Net Windows service application to host the WCF service that's using
    net.tcp with other ports.




    Comment

    Working...