Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - WCF Remote Client Callbacks using wsDualHttpBinding

Reply
 
Old 08-21-2008   #1 (permalink)


Vista
 
 

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 ClientBaseAddress (as follows);
Dim mybinding As WSDualHttpBinding = New WSDualHttpBinding(WSDualHttpSecurityMode.Message)
mybinding.Security.Message.ClientCredentialType = MessageCredentialType.Certificate
mybinding.Security.Message.NegotiateServiceCredential = True
Dim context As InstanceContext = New InstanceContext(New CallBack())
Dim myHost As String = Dns.GetHostName()
Dim ipEntry As IPHostEntry = Dns.GetHostByName(myHost)
Dim add As IPAddress() = ipEntry.AddressList
mybinding.ClientBaseAddress = New Uri("http://" + add(0).ToString() + ":" + "4000" + "/")
_client = New TCallSvcClient(context)
_client.Endpoint.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 wsDualHttpBinding (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.

My System SpecsSystem Spec
Old 08-22-2008   #2 (permalink)
Mr. Arnold


 
 

Re: WCF Remote Client Callbacks using wsDualHttpBinding


"lmod" <guest@xxxxxx-email.com> wrote in message
news:6348c806f154ac240d5c9fcb8d90f430@xxxxxx-gateway.com...
Quote:

>
> 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.
Quote:

>
> 1) how do I configure client callbacks using wsDualHttpBinding (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.
Quote:

>
> 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.

http://msdn.microsoft.com/en-us/library/aa751792.aspx

<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.




My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Remote Desktop CLient CPU usage Vista General
Remote Desktop Vista Client Vista networking & sharing
Remote desktop client Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46