win7上的WCF Duplex net.tcp问题
我们有一个WCF服务,有多个客户端来安排客户端之间的操作.它在XP上运行得很好.转到win7,我只能将客户端连接到同一台机器上的服务器.在这一点上,我认为它与IPv6有关,但我对如何继续下去感到困惑.
尝试连接到远程服务器的客户端提供以下异常:
该服务配置如下: <system.serviceModel> <services> <service name="SchedulerService" behaviorConfiguration="SchedulerServiceBehavior"> <host> <baseAddresses> <add baseAddress="net.tcp://localhost/zetec/Service/SchedulerService"/> </baseAddresses> </host> <endpoint address="net.tcp://localhost:18297/zetec/Service/SchedulerService/Scheduler" binding="netTcpBinding" bindingConfiguration = "ConfigBindingNetTcp" contract="IScheduler" /> <endpoint address="net.tcp://localhost:18297/zetec/Service/SchedulerService/Scheduler" binding="netTcpBinding" bindingConfiguration = "ConfigBindingNetTcp" contract="IProcessingNodeControl" /> </service> </services> <bindings> <netTcpBinding> <binding name = "ConfigBindingNetTcp" portSharingEnabled="True"> <security mode="None"/> </binding> </netTcpBinding > </bindings> <behaviors> <serviceBehaviors> <behavior name="SchedulerServiceBehavior"> <serviceDebug includeExceptionDetailInFaults="true" /> <serviceThrottling maxConcurrentSessions="100"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> 客户端连接如下: String endPoint = "net.tcp://" + GetIPV4Address(m_SchedulerHostAddress) + ":" + m_SchedulerHostPort.ToString(CultureInfo.InvariantCulture) + "/zetec/Service/SchedulerService/Scheduler"; NetTcpBinding binding = new NetTcpBinding(); binding.Security.Mode = SecurityMode.None; m_Channel = new DuplexChannelFactory<IProcessingNodeControl>(this,binding,endPoint); m_IProcessingNodeControl = m_Channel.CreateChannel(); 我已经检查过我的防火墙十几次了,但我想我可能会遗漏一些东西.尝试禁用Windows防火墙.我尝试将localhost更改为我的ipv4地址以尝试远离ipv6,我尝试删除任何反ipv6代码. 不知道它是否意味着什么,但是:
遗憾的是,telnet测试似乎并不重要.当服务运行时,我已成功从localhost和远程计算机连接到我的服务端口,但我的客户端无法从远程计算机工作. 看起来并不总能保证连接到localhost.桌面(win7 / 32)工作,笔记本电脑(win7 / 64)不起作用.其他win7 / 64盒子确实有效.也许是因为笔记本电脑上有多个网卡?也没有解释在测试人员系统上连接的失败. 我设置了两台完全禁用IPv6的win7机器(使用0xffffffff,如http://support.microsoft.com/kb/929852所示).没有帮助. 解决方法
有关您的主机基地址和终点地址的内容不正确.一个有明确的端口引用,另一个没有.通常,当您使用基址时,在端点地址中使用相对URL.
我想不出为什么这会与IPv6有关,因为没有错误消息提到IPv6地址. 也许在禁用net.tcp端口共享选项后再试一次.没有端口共享,您应该能够像使用telnet一样使用telnet来连接连接. 另外,您的服务如何在Win7中托管?在IIS7中还是在Windows服务中自托管?在服务中托管它可能需要一些权限才能在您的防火墙上打开端口之外授予您的exe(就像您有时必须在Win XP中使用HTTP托管Windows服务一样). 对不起,我赶时间,无法查找这些网址. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- 在Windows / OSX / Linux上为Python中的图标添加徽章
- 分享一个非常好用又好看的终端工具--Hyper (支持windows、M
- 如何在XAML中的形状内添加文本
- Media和MediaTemplate在WIX中有什么区别?
- microsoft-office-365 – 在Office 365中验证后,Microsoft
- .net – 如何以编程方式重新启动Windows资源管理器进程
- SMB协议利用之ms17-010-永恒之蓝漏洞抓包分析SMB协议
- windows-server-2008 – AD和Exchange 2010的最佳配置
- windows – 如何获取IPreviewHandler文件扩展名?
- 通过NTLM从Windows上的Java SE6客户端进行HTTP“协商”身份