问题:出现大量TIME_WAIT?端口耗尽?
1.Windows7下设置
System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send。
Unable to connect to the remote server。
System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted。
(1)开始-运行-regedit-确定。
(2)目录:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters,增加或者编辑十进制数据。
MaxUserPort:65534
TcpTimedWaitDe:30
TcpWindowSize:256960
拓展:hostname、域名等也在此目录下可寻找。
(3)以上临时端口设置完成,必须重启机器配置才生效。
2.Windows7查看端口
(1)开始-运行-cmd-确定。
(2)输入命令:netstat -n