remoting配置失败提示“请求的名称有效,但是找不到请求的类型的数据。 ”

用remoting实现的windows服务程序,一直运行良好,突然发现不能随系统启动了,手动启动没有问题。在事件查看器中发现提示如下异常:

无法启动服务。System.Runtime.Remoting.RemotingException: 远程处理配置失败,异常为“System.Reflection.TargetInvocationException: 调用的目标发生了异常。 ---> System.Net.Sockets.SocketException: 请求的名称有效,但是找不到请求的类型的数据。
   在 System.Net.Dns.GetAddrInfo(String name)
   在 System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
   在 System.Net.Dns.GetHostEntry(String hostNameOrAddress)
   在 System.Runtime.Remoting.Channels.CoreChannel.GetMachineName()
   在 System.Runtime.Remoting.Channels.CoreChannel.GetMachineIp()
   在 System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.SetupMachineName()
   在 System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(IDictionary properties, IServerChannelSinkProvider sinkProvider, IAuthorizeRemotingConnection authorizeCallback)
   在 System.Runtime.Remoting.Channels.Tcp.TcpChannel..ctor(IDictionary properties, IClientChannelSinkProvider clientSinkProvider, IServerChannelSinkProvider serverSinkProvider)

防火墙关闭杀毒软件关闭都无效。

网上查了一圈也没有结果,只看到有人说可能是dns解析的问题,想到前两天修改了电脑的hosts文件,然后将hosts文件中增加的代码删除重启电脑后恢复正常

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值