473,788 Members | 2,843 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Query open TCP Ports in DotNet

I need to get a list of "Open"/In-Use TCP Ports (actually to see if
there is a cponnection with a destination Port of 21)

I think what I'm after is similar to the output of netstat. I could run
netstat and parse the output, but I'd prefer not to as I'm going to be
doing this in a service and it needs to monitor the ports every few
seconds.

Any advice on how I can do it.

What I'm trying to do is control the way an FTP Process works, and
perform an action on the successful connection of an outgoing port
connecting to 21, then perform another action if a data connection is
required (i.e. the incoming port 20 connection)

There is a firewall on the computer this will be running on, I don't
know how a firewall takes the action of blocking a port, would the
firewall actually STOP that port from being created in the first place,
or allow it to be created, but then not used...?

Thanks

Cliff.

Nov 22 '05 #1
0 1560

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1774
by: BadOmen | last post by:
I am making my first simple chat program using winsock. Now I want to see which ports that are open. Is there any program that can show me that? It would be nice to see which ports are open and which program that uses it. Yours, Jonas
0
469
by: Cliff | last post by:
I need to get a list of "Open"/In-Use TCP Ports (actually to see if there is a cponnection with a destination Port of 21) I think what I'm after is similar to the output of netstat. I could run netstat and parse the output, but I'd prefer not to as I'm going to be doing this in a service and it needs to monitor the ports every few seconds. Any advice on how I can do it.
3
9331
by: andyI | last post by:
Where do I find information on how to address and pass data to and from the serial ports and USB ports in VB. VB6 supports the serial ports easily but I see no reference to using the USB ports. VB.net literature does not provide any coverage on either the serial ports or the USB ports.
1
1597
by: prabhupr | last post by:
Hi Is there any easy way to find out if there are any OPEN Ports on a BOX that are threat to the system
6
3636
by: Brad | last post by:
I have a win2003 server workstation with multiple webs, each web has it's own ip address. In VS2005, if I select to open an existing web site, select Local IIS, the dialog correctly displays a list of all of my webs, however if I attempt to open a site under and web other than localhost I receive the message: "Unable to open the Web 'http://localhost/anywebappname'. The Web 'http://localhost/anywebappname' does not exist" Obviously...
0
1327
by: Suman | last post by:
Hi All,    I am trying out a web based chat-server program on a server machine. I opened few PORTS during my trial runs and somehow the telnet session got crashed and I couldn't explicitly close the PORTs. Now when I try my program I get the following error http://152.69.155.107/chatserver2.php <<
3
15461
by: Mugunth | last post by:
Hi, I've a strange problem with serial port class of .NET Framework 2.0 I use com0com (Null Modem COM Port emulator) to emulate a virtual port. This application creates virtual com port pairs with starting with CNCA0 <-CNCB0 CNCA1<-CNCB1 etc., When I created a port with this name and try to open it using SerialPort.Open,
3
3551
by: =?Utf-8?B?Vmlua2k=?= | last post by:
Hello everyone, I am using .net remoting. Is there any way to find out the list of open ports. Thanks.
1
4133
by: Laszlo Nagy | last post by:
Hi All, I'm using a simple program that uploads a file on a remote ftp server. This is an example (not the whole program): def store(self,hostname,username,password,destdir,srcpath): self.ftp = ftplib.FTP(hostname) self.ftp.login(username,password) self.ftp.set_pasv(False)
13
9000
by: Alan Wright | last post by:
Hi Folks, I am newbie to Python, but have successfully created a simple client and server setup, I have one issue though. I am trying to test a box by sending many TCP conns (WHILE loop) but not closing them with a FIN/RST. However, no matter what i do, i cannot get the loop to stop sending FIN from the client. Any clues?
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10366
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10112
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5399
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4070
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3675
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.