Cassini Configuration API Documentation

Metabase.FindFreeTcpPort Method 

Retuns free TCP port that is also giaranteed to not be used by non-running Cassini applications.

[Visual Basic]
Public Function FindFreeTcpPort() As Integer
[C#]
public int FindFreeTcpPort();

See Also

Metabase Class | CassiniConfiguration Namespace