MaxPort Property  

Gets and sets the maximum port number used by the server for passive data connections.


object.MaxPort [= port ]


The MaxPort property specifies the maximum range of port numbers that will be used with passive data connections. A value of zero specifies the default value of 65535 should be used. The minimum value of this member is 10000 and the maximum value is 65535. If the value is non-zero, it must be greater than the value of the MinPort property.

Attempting to change the value of this property after the server has started will cause an exception to be raised. To change the maximum port number for the server, you must first call the Stop method which will terminate all active client connections.

Data Type

Integer (Int32)

See Also

ExternalAddress Property, MinPort Property