Using dynamic ports (port 0) in TcpListener; how to configure port ranges?

T

TlighT

Hi. I've created a .net service to transfer files from and to a server
from a client. When a file is transferred, the server opens a dynamic
port by suppling port 0 to the TcpListener it's created and then
communicates this port to the client so that the client knows how to
connect (much like passive ftp transfers).

Now when a sysadmin uses this service, is there any way he can control
which port ranges the .net framework or the underlying service provider
(and which provider is that?) uses?

Or is there a better way to get a dynamic port number using the .net
framework?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top