Hi, I decided to add a feature you verify the continuity port.
It is a function that works 100%.
You can edit the function for Timer and call in your Master.Page_Load or call the function directly.PHP Code:public bool PortInUse(int port)
{
bool inUse = false;
IPGlobalProperties ipProperties = IPGlobalProperties.GetIPGlobalProperties();
IPEndPoint[] ipEndPoints = ipProperties.GetActiveTcpListeners();
foreach (IPEndPoint endPoint in ipEndPoints)
{
if (endPoint.Port == port)
{
inUse = true;
break;
}
}
return inUse;
}
The function has a true or false return value.



Reply With Quote![[Release] Server status in C# ASP.NET](http://ragezone.com/hyper728.png)

