AddressAlreadyInUseException。端口没有被释放 [英] AddressAlreadyInUseException. Port is not released

查看:283
本文介绍了AddressAlreadyInUseException。端口没有被释放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C#中使用WCF我不止一次经历,该计划已经结束时,端口不会被释放。当我使用的TCPView我看到端口处于状态听和过程是子虚乌有。

in C# using WCF I have more than once experienced that a port is not released when the program has ended. When I use tcpview I see the port is in state "listening" and process is "non-existent".

怎么能这样呢,当进程没有运行任何更多?

How can this happen, when the process is not running any more?

我甚至无法通过的TCPView关闭它。我如何关闭连接?

I can't even close it via tcpview. How do i close the connection?

推荐答案

只是为了确保,你到处手动调用close()你的客户?
是有可能性的关闭可能会下滑,如果该程序以意想不到的方式结束了?

Just to make sure, do you manually call Close() your client everywhere ? Is there a possibility a Close could slip if the program ended in an unexpected way ?

顺便说一句,我认为你可以关闭僵尸连接<一个HREF =http://www.nirsoft.net/utils/cports.html相对=nofollow> currport

By the way, I think you can close zombie connections with currport

这篇关于AddressAlreadyInUseException。端口没有被释放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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