No connection could be made because the target machine actively refused it 192.168.131.196:1888
来源:互联网 发布:Linux下ifconfig 编辑:程序博客网 时间:2024/06/06 12:39
static void Main(string[] args) { IPAddress[] ips = Dns.GetHostAddresses(""); foreach (var ipAddress in ips) { Console.WriteLine(ipAddress); } Console.ReadLine(); }<span style="white-space:pre"></span>
首先单独运行了一下
<img src="http://img.blog.csdn.net/20150508165409584?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxMzI5MTMzNw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />
有ip6,有ip4
原代码中关于ip的是这样
客户端
IPAddress[] serverIp = Dns.GetHostAddresses(""); tbxSrvIp.Text = serverIp[0].ToString(); tbxSrvIp.SelectAll(); tbxPort.Text = "1888";
服务器端
IPAddress[] listenIp = Dns.GetHostAddresses(""); localAddress = listenIp[0];
————————————————————————————————————————————————————
我把0改成2,也就是v4,就可以了。
具体原因不太懂。
<img src="http://img.blog.csdn.net/20150508165733102?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxMzI5MTMzNw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />
0 0
- No connection could be made because the target machine actively refused it 192.168.131.196:1888
- HKT 日志: 无法发送数据给客户端: No connection could be made because the target machine actively refused it.
- Go丨语言对数据库操作报错 panic: dial tcp 127.0.0.1:3306: connectex: No connection could be made because the target machine actively refused
- Go丨语言对数据库操作报错 panic: dial tcp 127.0.0.1:3306: connectex: No connection could be made because the target machine actively refused
- Warning: mysqli::mysqli(): (HY000/2002): No connection could be made because the target machine acti
- window上mongodb错误:No connection could be made
- 配置penfire出现A connection to the database could not be made. ...错误
- XXX could not be redeployed because it could not be completely removed in the undeployment phase
- XXX could not be redeployed because it could not be completely removed in the un
- XXX could not be redeployed because it could not be completely removed in the un
- XXX could not be redeployed because it could not be completely removed in the undeployment phase
- ** could not be redeployed because it could not be completely removed in the undeployment phase
- XXX could not be redeployed because it could not be completely removed in the undeployment phase .
- myeclipse部署问题 ** could not be redeployed because it could not be completely removed in the ....
- ** could not be redeployed because it could not be completely removed in the undeployment phase
- The security settings could not be applied to the database because the connection has failed w
- Could not add target because the target \"D:\\01-Work\\qixue\\dbjk\\dbjk.pbt\" could not be created.
- The animation state could not be played because it couldn't be found!
- dc综合指令
- 自定义全文显示插件
- eclipse引进外部项目文件报错
- python之函数
- Linux下安装ArcGIS Server前的准备工作备忘录
- No connection could be made because the target machine actively refused it 192.168.131.196:1888
- linux 0.0.1
- ORACLE同义词总结synonyms
- zookeeper学习
- RequireJs边学边写:(一)初识RequireJs
- LeetCode 13 Roman to Integer (C,C++,Java,Python)
- CentOS7配置yum源出现的问题
- Android内存优化之二:MAT使用进阶
- eclipse内存溢出问题调试