开发者

NetTcpBinding & Teredo

It appears NetTcpBinding and Teredo don't work together. I'm running into the same issue as this old post: http://social.msdn.microsoft.com/Forums/sr-Latn-开发者_如何学编程CS/wcf/thread/bc331bb8-8ce5-4c69-a9cb-e48eda5fd0ba

Anyone else run into this and solve it? I'm running a servicehost and client locally and can ping6 just fine. But NetTcpBinding refuses to work despite raw Socket Teredo tests working just fine.

I'm enabling Teredo on the underlying TcpTransportBindingElement but it doesn't help.

var bindingElements = myNetTcpBinding.CreateBindingElements().ToList();

TcpTransportBindingElement tcpBindingElement = bindingElements.FirstOrDefault(be => be is TcpTransportBindingElement) as TcpTransportBindingElement;

tcpBindingElement.TeredoEnabled = true;

How is it possible that MS missed Teredo support on NetTcpBinding when the underlying Socket supports it?


This is how you do it:

CustomBinding b = new CustomBinding(new NetTcpBinding(SecurityMode.None));
b.Elements.Find<TcpTransportBindingElement>().TeredoEnabled = true;
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜