.Net Remoting中Remote Server的Port占用/释放问题
来源:互联网 发布:php posix 编辑:程序博客网 时间:2024/05/20 18:42
这一问题一般出现在Console application/Windows Service承载Remote Objects时,要求Remote Server指定特定port。IIS在承载Remote Objects并不需要指定特定port,因此一般不会出现SocketException异常信息。
1. 启动承载Remote Objects的Console application,发现指定的port状态为:LISTENING。
显然Remote Server开始监听该port,可以接受Client端的请求。
2. 在关闭承载Remote Objects的Console application后,发现指定的port状态为:TIME_WAIT。
如果现在启动该Console application,就会抛出如下异常:
An unhandled exception of type 'System.Runtime.Remoting.RemotingException' occurred in mscorlib.dll
Additional information: Remoting configuration failed with the exception System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port)
is normally permitted
SocketException异常:每一个socket address (protocol/network address/port)只能有一个使用。
3. 个人观点
关于TIME_WAIT状态,这是windows系统设计的,防止来自旧的连接(old connection)的剩余packets干扰新的连接(new connection)。因此,默认会等待4分钟,让那些剩余的packets丢弃掉。
因此,不要试图去解决这一问题。等待4分钟左右的时间,确认该port确定已释放,再启动Remote Server,如Console application/Windows Service等。
不同观点或意见,请发表评论或指出。谢谢。
- .Net Remoting中Remote Server的Port占用/释放问题
- .Net Remoting中Remote Server的Port占用/释放问题
- .Net Remoting中Remote Server的Port占用/释放问题
- .Net Remoting中Remote Server的Port占用/释放问题
- .Net Remoting中Remote Server的Port占用/释放问题
- .Net Remoting中Remote Server的Port占用/释放问题
- .Net Remoting中Remote Server的Port占用/释放问题
- .Net Remoting中Remote Server的Port占用/释放问题
- .Net Remoting中Remote Server的Port占用/释放问题
- .Net Remoting中Remote Server的Port占用/释放问题
- .Net Remoting中Remote Server的Port占用/释放问题
- .Net Remoting中Remote Server的Port占用/释放问题
- .Net Remoting中Remote Server的Port占用/释放问题
- .Net Remoting中Remote Server的Port占用/释放问题
- .Net Remoting中Remote Server的Port占用/释放问题
- .Net Remoting中Remote Server的Port占用/释放问题
- .Net Remoting中Remote Server的Port占用/释放问题
- .Net Remoting中Remote Server的Port占用/释放问题
- 书评 -- Programming Microsoft ASP.NET 2.0 Application Advanced Topics
- socket异步处理问题
- 如果你是程序员你或许不须以撰写组件维生,但我确信你必定得依赖组件维生!
- JavaScript组件之JQuery(A~Z)教程(基于Asp.net运行环境)[示例代码下载]
- 撰写信息书籍注意事项
- .Net Remoting中Remote Server的Port占用/释放问题
- Asp.net 2.0 自定义控件开发[开发一个图表(WebChart)控件(柱状图示例)](示例代码下载)
- 书评--规划极致软件制程(Planning Extreme Programming)
- 像Component的Control
- Asp.net 2.0 自定义控件开发专题讲解[为用户控件增加DataSource属性, 能够自动识别不同数据源](示例代码下载)
- 2007.5.13 祝天下所有的母亲: 节日快乐!
- 信道、接收器、接收链和信道接受提供程序
- 书评--资料仓储理论与实务
- Inside ASP.NET 2.0-即时编译系统