WCF客户端(netTcpBinding)无法连接到Vista和Windows 7上的远程DNS [英] WCF Client (netTcpBinding) does not connect to remote DNS on Vista and Windows 7

查看:104
本文介绍了WCF客户端(netTcpBinding)无法连接到Vista和Windows 7上的远程DNS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WCF客户端(netTcpBinding)在Vista和Windows 7上无法连接到远程DNS.对于其他操作系统,例如XP和Windows 2003,客户端可以正确连接到远程DNS.我遇到以下异常.

WCF Client (netTcpBinding) does not connect to remote DNS on Vista and Windows 7. With other OS like XP and Windows 2003, client connects to remote DNS properly. I got the following exception.

如果本地网络中有服务,则同一客户端可以在Vista和Windows 7中运行.

Same client works in Vista and Windows 7 if service is available in local network.

以下是例外:

< Exception>
< ExceptionType> System.ServiceModel.EndpointNotFoundException,System.ServiceModel,Version = 3.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089</ExceptionType>
<消息>不存在主机icelive.theice.com的DNS条目.</消息>
< StackTrace>
在System.ServiceModel.Channels.DnsCache.Resolve(String hostName)
在System.ServiceModel.Channels.SocketConnectionInitiator.GetIPAddresses(Uri uri)
在System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri,TimeSpan超时)处
在System.ServiceModel.Channels.BufferedConnectionInitiator.Connect处(Uri uri,TimeSpan超时)
在System.ServiceModel.Channels.TracingConnectionInitiator.Connect(Uri uri,TimeSpan超时)处
在System.ServiceModel.Channels.ConnectionPoolHelper.EstablishmentConnection(TimeSpan超时)
在System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan超时)
在System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan超时)处
在System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan超时)
在System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan超时)处
在System.RuntimeMethodHandle._InvokeMethodFast处(对象目标,Object []参数,SignatureStruct& sig,MethodAttributes methodAttributes,RuntimeTypeHandle typeOwner)
在System.RuntimeMethodHandle.InvokeMethodFast处(对象目标,Object []参数,签名sig,MethodAttributes,methodAttributes,RuntimeTypeHandle typeOwner)
在System.Reflection.RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder装订器,Object []参数,CultureInfo文化,布尔skipVisibilityChecks)
在System.Reflection.RuntimeMethodInfo.Invoke(对象obj,BindingFlags invokeAttr,活页夹绑定程序,Object []参数,CultureInfo文化)
在System.ServiceModel.Channels.ServiceChannelProxy.ExecuteMessage(Object target,IMethodCallMessage methodCall)
在System.ServiceModel.Channels.ServiceChannelProxy.InvokeChannel(IMethodCallMessage methodCall)处
在System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage消息)处
在System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke处(MessageData& msgData,Int32类型)
在System.ServiceModel.ICommunicationObject.Open(TimeSpan超时)处
在System.ServiceModel.ClientBase`1.System.ServiceModel.ICommunicationObject.Open(TimeSpan超时)处
在System.ServiceModel.ClientBase`1.Open()
在WCFClient.CMainForm.OnInvokeMethods(Object sender,EventArgs e)中
在System.Windows.Forms.Control.OnClick(EventArgs e)处
在System.Windows.Forms.Button.OnClick(EventArgs e)处
在System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)中
在System.Windows.Forms.Control.WmMouseUp(Message& m,MouseButtons按钮,Int32单击)上
在System.Windows.Forms.Control.WndProc(Message& m)中
在System.Windows.Forms.ButtonBase.WndProc(Message& m)中
在System.Windows.Forms.Button.WndProc(Message& m)中
在System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)中
在System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)中
在System.Windows.Forms.NativeWindow.Callback处(IntPtr hWnd,Int32 msg,IntPtr wparam,IntPtr lparam)
在System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)中
在System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID,Int32原因,Int32 pvLoopData)
在System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32原因,ApplicationContext上下文)中
在System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32原因,ApplicationContext上下文)
在System.Windows.Forms.Application.Run(Form mainForm)处
在WCFClient.Program.Main()
</StackTrace>
< ExceptionString> System.ServiceModel.EndpointNotFoundException:主机icelive.theice.com没有DNS条目. ---& gt; System.Net.Sockets.SocketException:所请求的名称有效,但是未找到所请求类型的数据
  在System.Net.Dns.GetAddrInfo(字符串名称)
  在System.Net.Dns.InternalGetHostByName(字符串hostName,布尔值includeIPv6)
  在System.Net.Dns.GetHostEntry(字符串hostNameOrAddress)
  在System.ServiceModel.Channels.DnsCache.Resolve(String hostName)处
   ---内部异常堆栈跟踪的结尾---</ExceptionString>
< InnerException>
< ExceptionType> System.Net.Sockets.SocketException,System,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089</ExceptionType>
<消息>所请求的名称有效,但未找到所请求类型的数据</消息>
< StackTrace>
在System.Net.Dns.GetAddrInfo(字符串名称)
在System.Net.Dns.InternalGetHostByName(字符串hostName,布尔值includeIPv6)
在System.Net.Dns.GetHostEntry(字符串hostNameOrAddress)
在System.ServiceModel.Channels.DnsCache.Resolve(String hostName)处
</StackTrace>
< ExceptionString> System.Net.Sockets.SocketException:所请求的名称有效,但未找到所请求类型的数据
  在System.Net.Dns.GetAddrInfo(字符串名称)
  在System.Net.Dns.InternalGetHostByName(字符串hostName,布尔值includeIPv6)
  在System.Net.Dns.GetHostEntry(字符串hostNameOrAddress)
  在System.ServiceModel.Channels.DnsCache.Resolve(String hostName)</ExceptionString>
< NativeErrorCode> 2AFC</NativeErrorCode>
</InnerException>
</Exception>

<Exception>
<ExceptionType>System.ServiceModel.EndpointNotFoundException, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>No DNS entries exist for host icelive.theice.com.</Message>
<StackTrace>
at System.ServiceModel.Channels.DnsCache.Resolve(String hostName)
at System.ServiceModel.Channels.SocketConnectionInitiator.GetIPAddresses(Uri uri)
at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
at System.ServiceModel.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
at System.ServiceModel.Channels.TracingConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct&amp; sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.ServiceModel.Channels.ServiceChannelProxy.ExecuteMessage(Object target, IMethodCallMessage methodCall)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeChannel(IMethodCallMessage methodCall)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgData, Int32 type)
at System.ServiceModel.ICommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.ClientBase`1.System.ServiceModel.ICommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.ClientBase`1.Open()
at WCFClient.CMainForm.OnInvokeMethods(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message&amp; m)
at System.Windows.Forms.ButtonBase.WndProc(Message&amp; m)
at System.Windows.Forms.Button.WndProc(Message&amp; m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at WCFClient.Program.Main()
</StackTrace>
<ExceptionString>System.ServiceModel.EndpointNotFoundException: No DNS entries exist for host icelive.theice.com. ---&gt; System.Net.Sockets.SocketException: The requested name is valid, but no data of the requested type was found
   at System.Net.Dns.GetAddrInfo(String name)
   at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
   at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
   at System.ServiceModel.Channels.DnsCache.Resolve(String hostName)
   --- End of inner exception stack trace ---</ExceptionString>
<InnerException>
<ExceptionType>System.Net.Sockets.SocketException, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>The requested name is valid, but no data of the requested type was found</Message>
<StackTrace>
at System.Net.Dns.GetAddrInfo(String name)
at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
at System.ServiceModel.Channels.DnsCache.Resolve(String hostName)
</StackTrace>
<ExceptionString>System.Net.Sockets.SocketException: The requested name is valid, but no data of the requested type was found
   at System.Net.Dns.GetAddrInfo(String name)
   at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
   at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
   at System.ServiceModel.Channels.DnsCache.Resolve(String hostName)</ExceptionString>
<NativeErrorCode>2AFC</NativeErrorCode>
</InnerException>
</Exception>

您有任何建议吗?

推荐答案

您可以发布服务的app/web.config吗?

Can you post the app/web.config of the service?


这篇关于WCF客户端(netTcpBinding)无法连接到Vista和Windows 7上的远程DNS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆