473,320 Members | 2,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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.NegotiateServiceCredent ial = 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.
--
lmod
Aug 22 '08 #1
1 11363

"lmod" <gu***@unknown-email.comwrote in message
news:63******************************@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 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.
>
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.


Aug 22 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Lain | last post by:
Hi all I'm trying to obtain remote client information to present on a web page using WMI. The problem I have is that no matter how hard I try (and how cross-eyed I get from reading doco) I can't...
1
by: AG | last post by:
Every night i want to send the new records that are created from my remote client to my FTP site, using a application which sets up an internet connection on the client , exports the data to the...
0
by: Just D. | last post by:
Does anybody knows the solution if this problem? If we wrote the ASPX page and send the request to the remote browser the remote client browser returns the remote machine IP using by this machine...
1
by: Suramya | last post by:
Hi Friends, I like to record a video file from remote client machine's webcam(from browser) to the server machine (where IIS is running). I could see an example of video recording for windows...
8
by: david | last post by:
I have made a test: copy a text file to clinet side. But fails. What I did is that create a web method in web services that read a text in server side and return the text file as string. On the...
0
by: Papanii Okai | last post by:
Hi Guys Quick question. Is it possible to use Asp.net 2.0 client callbacks to refresh/update a datalist/repeater data control without a complete page postback? --Papanii
2
by: O.B. | last post by:
In the following code snippet, the thread successfully makes it to the line where it waits for data to be received. Then the client closes the connection. The thread wakes up and returns from the...
1
by: =?Utf-8?B?QU5lZWxpbWE=?= | last post by:
I have been reading about asp.net 2.0's client callbacks using the ICallbackEventHandler interface. I have also read that it is pretty much a light-weight AJAX type methodology and that it uses...
2
by: qwedster | last post by:
Hi Experts! Apropos MSDN link: http://msdn.microsoft.com/en-us/library/ms178208.aspx Implementing Client Callbacks Programmatically Without Postbacks in ASP.NET Web Pages Using the code...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.