开发者

WCF duplex with DHCP?

I'm using a duplex WCF contract in this chat-like application that i have running. (obviously not really a chat, but for the interest of thinking about it you can assume it's similar enough).

the problem is that many of the clients that talk over this contract are running dhcp, and there's not re开发者_如何学编程ally anything i can do about this.

What's the best way to handle duplex communication with dhcp? I found a setting <compositeDuplex clientBaseAddress="Uri"/> which means i could update this value at runtime.... seems a bit kludgy.

Update I found that in my WCF server logs, part of the problem is that it was putting hostname in the response address. what am i doing wrong here?

thanks


To be blunt, the first thing that you're doing wrong is using DualHttpBinding to do duplex. That whole binding is a giant kludge and is prone to problems like this (and firewalls, oh god firewalls).

If you were to use something like net.tcp instead then the clients establish a single bidirectional connection to the server instead of needing two connections, and thus the server doesn't care if the client is on DHCP anymore.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜