Click here to Skip to main content
15,892,059 members
Everything / Ports

Ports

ports

Great Reads

by ASP.NET Community
Lot of people trying to edit the code when ASP.NET Development Server is running but they can't. In order to edit code you have to stop debugger/
by ASP.NET Community
When you use the ASP.NET Development Server to run a file-system Web site, by default, the Web server is invoked on a randomly selected port for
by ASP.NET Community
Introduction When you want to send email message, you must create an instances of MailMessage and SmtpClient classes. This classes are in
by ShadowedR
A simple example of a C# Application interfacing with the Null Modem Emulator (com0com) driver to allow run time creation and configuration of Virtual Serial Ports

Latest Articles

by Lucas Ontivero
A Bitcoin traffic sniffer that intercepts bitcoin protocol messages and analyzes them in order to check if bitcoin addresses in transactions are vulnerable.
by Gregory Morse
How to create and use the parallel task library ported for native C++ WRL
by Gregory Morse
WRL Collection library ported to native C++
by Shivachalappa Gotur
Detecting USB Modem Device using C#.NET

All Articles

Sort by Updated

Ports 

24 Apr 2023 by Fatin Fatima Abdullah
I am working on a program for TCP/UDP port scanning. TCP is working fine and well but it seems like I have no idea on how to achieve the UDP port scanning using the AutoIt.Since the UDP port is connectionless I am using UDPOpen function to bind my $PortIP and $PortStartNumberB....
24 Apr 2023 by Member 15987316
May be it help Local $port If $CmdLine[0] == 0 Then MsgBox(0x0,"Err","arg is empty") Exit 1 Else $port = $CmdLine[1] EndIf Func _MyPortExists($port) Local $sRead, $sBuffer, $CMD_PId $CMD_PId = Run(@ComSpec & ' /c netstat -an |...
4 Dec 2022 by Member 14623639
I have searched everywhere but couldn't find as they are all answering to send message to all clients. What I want to achieve is multiple clients request to server to request data from another client and other client sends data to server telling...
23 Nov 2022 by Rick Developer
We have new PCs that have Windows 10 or Windows Server 2019 installed. Cards can now be plugged into certain PCI buses. I want to find out on which PCI bus a card is plugged in. Does anyone have an idea how to find out relatively reliably under...
14 Sep 2022 by Death Smoke
The Code dont print the Blankspace when I type it between words in the message getline it only print first word or last letter but if i write between words any character like -./\_ it will print the full message , Example : -Without character: I...
14 Sep 2022 by Rick York
jeron1 gave you the answer. Here are a couple of references you should consult to verify what was stated : operator>> (string) - C++ Reference[^], this one describes the redirection operator and this one : istream::getline - C++ Reference[^]...
25 Jul 2021 by Ṉobody
I am developing an application that blocks port scanning attempts on the network to prevent device security breaches. I'm looking for someone to guide me how to block port scan in windows using C# or VB.NET. What I have tried: I am developing...
25 Jul 2021 by Dave Kreskowiak
Simple. You don't. This is a firewall configuration issue. If you're trying to block "port scans" from a certain machine, you have to block all outbound ports that are not normally used. If you're trying to block incoming scans, well, you setup...
25 Mar 2020 by ZurdoDev
Go into IIS and setup a website on a specific port. You might have done that with port 52059 or that might be a dynamic port from VS and will change so you want to have one that does not change so you need to set that up in IIS. Then as long as...
25 Mar 2020 by Member 14782428
My website is hostet on ISS. The server PC works great. My client PC shows the webpage,but when I push a button, Fiddler says:" No connection could be made because the target machine actively refused it 127.0.0.1:5059". My webpage is called...
9 Aug 2019 by Member 14525261
how to Check the port from the external IP of the network port tcp ? What I have tried: how to Check the port from the external IP of the network
9 Aug 2019 by Member 14525261
The code did not work By IP address
8 Aug 2019 by Gerry Schmitz
Ping.......... Network.Ping Method (Microsoft.VisualBasic.Devices) | Microsoft Docs[^]
17 Apr 2019 by Rick York
This behavior is by design because that is the nature of Unicode characters. The lower batch, below value 256, have a zero following them because they are (generally) a 16-bit value so the MSB will be zero. I would use the TCHAR macros if you are going to compile in both modes. Here's an...
17 Apr 2019 by Member 12557572
I am using SetupDiGetDeviceRegistryProperty from setupapi in Visual Studio. If I use the Multicharacter set, the byte pointer (BYTE* friendlyName) gives the correct FRIENDLYNAME. However, when I compile it using the Unicode Character set, the returned friendlyName has a NULL character behind...
22 Aug 2018 by Hazel J Chua
@Jochen Arndt, Tried changing the query to use MSSerial_PortName and all I got was an error in the query with no results returned. After some reading the following query did work: strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems =...
22 Aug 2018 by Hazel J Chua
Hi there, I'm trying to query the WMI for serial port connections (COM ports). I can see the ports on the Device Manager but when trying to query them through WMI (Win32_SerialPort), nothing shows up. I am able to connect to one of the ports (COM7) via the HyperTerminal. It is a GSM/GPRS...
22 Aug 2018 by Jochen Arndt
The Win32\_SerialPort class | Microsoft Docs[^] lists only physical serial ports and not virtual ones provided by device drivers. One solution is to use the MSSerial_PortName class in the \root\WMI namespace. See also List of SerialPorts queried using WMI differs from devicemanager? - Stack...
11 Apr 2018 by OriginalGriff
You will not get any help here. Quote: I have extracted the game data from one of the games from the disk This is in direct violation of the licensing agreement between yourself and the company that produced the game, and is thus malicious activity. Trying to "port the game to Windows" would be...
11 Apr 2018 by Member 13755707
Hey, I need some advice I am doing a personal test to see what I can do with my programming skills and I need to know how one would port a xbox 360 game to windows pc. I have extracted the game data from one of the games from the disk but I need to know how to use that data to run the game on...
8 Apr 2018 by User 13737271
I try to complete a task "Enable Access to Server" in Cisco Aspire game, but I got stuck. How to identify the port number of Game Server so that I can put it in Applications&Gaming settings of the router? The task: https://prnt.sc/j2ri7b Game Server ip address - 192.168.0.98 Laptop ip address...
17 Oct 2017 by Rodrigo Alex Rodriguez
the truth is that I do not know how to start when we do right click and go to Device Manager shows us in the ports a list of connected devices, now I want to know how I can bring that same list to my combobox, working in windowsForm C #: this is imagen Port Imagen What I have tried: this is...
17 Oct 2017 by Member 13343508
In c#, you can get PC details using System.Environment.PortNumber you may also get other details like MachineName etc.
17 Oct 2017 by Rodrigo Alex Rodriguez
This is solution using System; using System.IO.Ports; namespace SerialPortExample { class SerialPortExample { public static void Main() { string[] ports = SerialPort.GetPortNames(); foreach(string port in ports) { ...
16 Oct 2017 by Richard MacCutchan
list com ports C# - Google Search[^]
7 May 2017 by MinYoung Lee
I want to use NtQueryInformationPort function below in DriverEntry function to know all of the listening ports number. However, I don't know how to get PortHandle which is the first parameter in NtQueryInformationPort. Is there someway to get PortHandle? /*++ Copyright (c) Microsoft...
7 May 2017 by Jochen Arndt
Quote: to know all of the listening ports If you don't know the ports you can't use a function that queries information for a specific port number defined by a handle. Even if you would have a handle calling that undocumented function would give you no useful information because no information...
24 Mar 2017 by Member 12518776
This code is able to run, however it only return 0 even though the device has some value. The device is a roller machine where it should give the rolling meter value to the port number 3 however, my code always return the output as 0.Please help me as soon as possible as this is a critical...
24 Mar 2017 by OriginalGriff
Um. Stop doing that!You have two different ways to read data in the same code: a loop which removes data and an event which also removes data. Pick one method, and stick with it.Second, check that the machine is outputting data at all, and that your PC is receiving it: use something like...
25 Jan 2017 by JeezyWonder
Good Day, Fellows. The problem is that i cant gunderstand how to send data from my pc to microcontroller.On the electronic side everything is working, PC can see my com-port.Maybe someone has a step-by-step guide?Any help, please.thanks in further.What I have tried:I found a...
25 Jan 2017 by CPallini
As noted by Jochen, your problem has nothing to do with the serial communication. The error clearly states the rtbIncoming object does not exists in your Form. The array ArrayComPortsNames contains the sequence of serial port names, you might use it to fill the items of a listbox (or whatever).
15 Dec 2016 by RAHUL(10217975)
Hello guysI am creating a wpf application in which I connect to android application through TCP listener. I made a separate class for tcp listener because i wanted to call it from all wpf forms.So till now its working fine from my main form but when i call tcp listener from another form i...
15 Oct 2016 by Krunal Ifuturz
I developed one MVC web application which have Web APIs and hosted in Amazon Instance and one windows application for calling those APIs for getting response from that server.Both Web and Windows applications are developed in asp.net framework 4.5 using c# language.Windows application is...
9 Sep 2016 by Lucas Ontivero
A Bitcoin traffic sniffer that intercepts bitcoin protocol messages and analyzes them in order to check if bitcoin addresses in transactions are vulnerable.
5 Sep 2016 by Gregory Morse
How to create and use the parallel task library ported for native C++ WRL
9 Aug 2016 by Member 11861951
I am using the netsh command to add users to the registered port. As the port is registered, I am not able to add other users to it without deleting the port. So how can use netsh command in this case?What I have tried:I have tried using Netsh http add urlacl url=http://+:80/...
5 Apr 2016 by kardexx1
Solved:In the arduino code, after the 'for' loop instead of Serial.println() (which tells the program to do a carriage return and a new line) you have to put Serial.print("\n"); which only creates the new line, problema solved.So the arduino code should end up like this#include...
5 Apr 2016 by kardexx1
Hi, I´m working on a Project, that verifies a UID in a WPF application when you pass a picc on the MFRC522 reader. Every time I´ve tried it looks like it didn´t recognised the picc. The programm should theoretically work like this:The Arduino MFRC522 shield looks for a picc, when it...
25 Feb 2016 by Jochen Arndt
Because UDP is connectionless, you have to send some data and wait some time if you get an ICMP Destination unreachable (Wikipedia)[^] message with code 3 indicating that the port is unreachable. But note that a time out is not a reliable indication that an UDP service is listening. If...
6 Dec 2015 by Gregory Morse
WRL Collection library ported to native C++
6 Dec 2015 by Richard MacCutchan
I have never heard of "Windows 2007" or "Windows XP 2003", so perhaps you mean something else. However, see https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/netsh.mspx?mfr=true[^] for details of this command.
6 Dec 2015 by Member 11773323
I need to open port in Win xp 2003I used to open port in the command Prompt in windows 2007 with the command:"netsh http add urlacl url=http://+:8181/ser user=User"now when I need to do the same thing but in Windows xp 2003 it doesnt recognize the commandcan someone help me and...
29 Oct 2015 by Patrice T
You attack the problem wrong.A properly configured NAT is automatically doing what is needed to establish proper communication between client and server and return.The fact that there is a NAT is not a problem.This is exactly what is silently doing your DSL-box or your...
29 Oct 2015 by bling
"To resolve this issue I was wondering if I can use the specified port forwarding facility of the virtual machine for NAT network."You don't need port forwarding from the client end. That's only needed if to offer a local service behind your firewall to the outside world.If you can surf...
28 Oct 2015 by barneyman
implement UPnP in the client program - EXACTLY designed to handle this scenarioNAT traversal[^]
28 Oct 2015 by phil.o
I don't get the whole situation very well, I would be inclined to approve ppolymorphe and say that it's the job of the NAT router.Basically, the client (the application in your VM) sends a packet to an ip address outside the LAN. Thus, gateway address will be used. Gateway address should be...
28 Oct 2015 by Chirantan Ghosh
Can we limit the available port numbers in window 7 so that any program which is asking for random ports will get the port in that range only.This will help me to get the port number that a program might randomly selecting.[Update]Okay , let me give the background of the problem I am...
28 Oct 2015 by Tonex247
I saw this on a Microsoft site: https://support.microsoft.com/en-us/kb/929851which uses the "netsh" command to set dynamic port range. I hope this works for you. if it does work, don't forget to accept it as an answer.
24 Aug 2015 by Zoltán Zörgő
Use WMI. Win32_Printer[^] class has PortName property.Som other lecture in this topic: Managing Printers Programatically using C# and WMI[^]
24 Aug 2015 by Jackson K T
Hello, How to Identify the default printer's port is parallel port or usb port using c# code
21 Aug 2015 by Member 11915058
OMG!I found it, in port settingDtrEnable=TrueKudos for Ed Tenholder
17 Aug 2015 by Member 11915058
Hello.I have an issue with receiving and displaying in a text box.I can send data with no problem (to the microcontroller) but I can`t display what the micro is sending.I tried every tutorial available but still can`t receive.using System;using...
26 Jul 2015 by suraty
What port number is best for wifi send/receive UDP packets in android?I see some programs and all of them are different. like 8889,6666,...Which is speeder, more speed?
9 Jul 2015 by Member 11780461
Sending a command to a serial device using this program. It is suppose to send 01P00104## with the ascii control characters at the beginning and end (stx,etx). When performing the loopback test on my serial cable, I get exactly what I needed but when I connect to my serial device I get no...
7 Jul 2015 by Member 11682338
I need to do datatransfer with my older 16ch Sony Dat recorder. This is connected to the PC via parallel port IEEE 1284 EPP mode standart. How to use parport.sys to do propper handshake ... ?
3 Jul 2015 by Shivachalappa Gotur
Detecting USB Modem Device using C#.NET
17 Jun 2015 by OriginalGriff
The only way in practice to overcome this is: don't use a static method.You can bodge round it by creating a static Form variable and loading it with your form instance, but it is just that: a bodge. And as soon as you have two instances of the form it all falls apart.So look at why you...
17 Jun 2015 by chandubbbb
I need to update windows form controls data from Static method. we cannot access controls from static method because they are instance fields.then how to over come this.private static void DataReceivedHandler( object sender, ...
18 May 2015 by Dave Kreskowiak
Try reading the documentation on the ComboBox[^]. If there are no items in the ComboBox, 0 is an invalid index.If there are no items in the Combo, the only valid index value is -1.
18 May 2015 by Member 11700523
Greetings! I'm currently making a project involving USB Modem and Visual Basic. I created a ComboBox wherein it should show all available ports. Here's my code for the ComboBox.Imports SystemImports System.IO.PortsImports System.ThreadingPublic Class Form1 Private Sub...
12 May 2015 by Antonis Papadakis
Hello, i am new at c#I have ipcam and i use DNS and specific port for the cam. i want to create one program to check the status of my cam when is online or offline.can u help me what i have to do?Thanks
6 May 2015 by S-N-A1
Please Help , Any response I will appreciate because I'm frustrated after two weeks of researches. Settings :- Router huawei HG532b configured to forward port = 50111 by enable NAT > DMZ and put Host address IP = 192.168.1.5 , and that is static IP of my PC in the Network.- the router...
22 Apr 2015 by User 59241
You have a gadget using Realtek RTL2832U device (ezcap USB 2.0 DVB-T/DAB/FM dongle) http://www.realtek.com.tw/products/productsView.aspx?Langid=1&PFid=35&Level=4&Conn=3&ProdID=257[^]This should get you going:http://sdr.osmocom.org/trac/wiki/rtl-sdr[^]and...
21 Apr 2015 by Member 7964422
Hello. I have a MS Visual C# (2013) WPF program that I'm trying to read data being received on a USB port. I have code that will recognize the USB Device (A ADB-S Usb Dongle) as VID: 0BDAPID: 2838Friendly Name: RTL2838UHIDIRDevice Class: UsbDeviceDevice Location: ...
19 Apr 2015 by slswcharlie
HiUsing XL2000 and Win7.I have low volume of data, (5-8 rows, single column, single digits only)from Excel to a bluetooth serial port, and on to a Arduino micro to turn leds on/offSeems what I want to do is that HyperTerminal is not in this version.Nor is MScomm.ocxWhat is the...
1 Apr 2015 by Sergey Alexandrovich Kryukov
Read it paying more attention: https://msdn.microsoft.com/en-us/library/aa450503.aspx.Don't you see something strange? You never read "comm state" of anything physical. In the example, for example, you read defaults. How?Here is the thing: the port itself does not have any particular...
1 Apr 2015 by Diego_R
#IntroductionFirst I would like to apologize for my bad English. I do not speak English and am using Google translator.I need to develop a program in C ++ for windows. This program will control serial ports in my application.#The problemIt is possible to get the settings as baud rate,...
31 Mar 2015 by ijalab
Hi,I have RS232 connection to a device and I used the SerialPort Wrapper in C#. I am able to establish connection and be able to access registers. What I need is to continuously monitor the connection and automatically indicate disconnect(button) in GUI whenever there is a reset on the...
30 Mar 2015 by Mark Farmiloe
No expert on WPF, but isn't the ViewModel a class specifically used to bring together all the bits for a view, i.e. you just need to include the totalErrors in your ConnectionViewModel.
30 Mar 2015 by Chris Platsikoudis
As the title says I have a WPF application which communicates to a USB relay via a serial port, and (because the COM port changes depending on which USB port you connect it to) I want to have a combobox to select the appropriate one. I have sort of found a way to bind the combobox to a list...
17 Mar 2015 by Ananda_mr
Hi,I need to get list of applications listening on different ports of a remote machine. Is there a way to execute this and if so, please help me the commands or programming way to implement this feature.Thanks in advance.Regards,Anand
11 Mar 2015 by Richard Deeming
Have a look at this article:Retrieving IP and MAC addresses for a LAN[^]
11 Mar 2015 by Member 11138570
How can I get the IP addresses of all peers that are connected to a Local Area Network in C#?
23 Jan 2015 by Zoltán Zörgő
I am pretty sure it can be retrieved without fancy hacks. Consult Process Hacker's[^] code. What can be done in C++ in such case, can be also done in C#, with p/invoke at least...WMI Win32_PerfRawData_PerfProc_Process[^] has IO properties, but thos include all IO activity.What you can try is...
23 Jan 2015 by Member 11138570
How could I know whether a program currently using internet at a point in time, in Windows, using C#?I've tried using Windows "netstat" commands like "netstat -no", but the connection state is shown "ESTABLISHED" even when the program is not transmitting or receiving any network data.Is...
1 Dec 2014 by ShadowedR
A simple example of a C# Application interfacing with the Null Modem Emulator (com0com) driver to allow run time creation and configuration of Virtual Serial Ports
9 Oct 2014 by jadavparesh06
You will required to have the Refresh applied on your textbox so it will display all the texts while the loop is running.You will require to have a static class for ExtensionMethods that will contain your refresh routine.public static class ExtensionMethods { private static...
9 Oct 2014 by AmitGajjar
Hi,You can use background worker so your UI wont be stop till the time your while loop is running. Let me know if it wont work for you.Refer : Background Worker[^]Thanks
9 Oct 2014 by Bryan Fil
When I click on the button the code runs correctly but the text box does not update in the UI until the entire while loop has finished. I need it to update the text box on every loop.private void btnBeginTransfer_Click(object sender, RoutedEventArgs e) { serial.PortName...
16 Sep 2014 by Thanks7872
Read this : http://www.4guysfromrolla.com/articles/011404-1.aspx[^]
16 Sep 2014 by S.Dwaik
how server can detract the request come from who and how server work with session when you do request from same PC with diffract browser ?
21 Aug 2014 by Lucas Ontivero
A class library for port forwarding in NAT devices that support Universal Plug and Play (UPNP) and/or Port Mapping Protocol (PMP)
20 Aug 2014 by ashish8patil
Hi All ,I am facing one issue while communicating with device which is connected via SCSI port.All calls which we are making with device is like below, and they are working properlly...
11 Aug 2014 by adeelIdealist
I can easily upload files with ftp protocol using inet control in vb6. But with http protocol, I'm getting an error "unable to complete request". And I am not sure if my server supports http upload. Any help plz
1 Aug 2014 by Member 10689667
so I have an C# WinForm that useSerialPort SerialPort1 = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One);SerialPort1.Open()SerialPort1.DataReceived += new SerialDataReceivedEventHandler(...)to listen on several Virtual COM Ports that Created by other Software(I can't...
27 Jul 2014 by Emiliarge
How to send data to device and receive data from device through COM-port
30 May 2014 by User 59241
This is a robust approach:private SerialPort _serialPort; _serialPort = new SerialPort(); _serialPort.Open(); _serialPort.DataReceived += dataReceivedHandler; private void dataReceivedHandler(object sender, SerialDataReceivedEventArgs args) { ...
30 May 2014 by Herman<T>.Instance
Use sp.ReadExisting();in that case you read the complete buffer in stead of 1 line
30 May 2014 by RAHUL(10217975)
I am working in windows application. I am using serial COM port in my application. I am getting previous data from serial port after second scan . First time scan I got the data, second time I am recieving the same data.My code in datarecievehandler event of serial port public static void...
30 May 2014 by jamagboo
Uninstall and reinstall COM Port on the device manager.
28 May 2014 by CPallini
(If I got you) Yes, it is doable, definitely. It is just a simple client (PC) / server (mobile device) architecture using the serial port for communication."simple client server architecture C#"[^]."Serial communication in C#"[^].
28 May 2014 by jamagboo
Please help me with this. I have two applications, desktop app and mobile app(the mobile terminal runs in windows CE and is connected to pc via serial port).the desktop application sends a request to mobile app and the mobile apps process the request and send a response to pc (desktop app)....
4 May 2014 by OriginalGriff
Start with SerialPort.GetPortNames(v=vs.110).aspx[^] to find all available ports to the system, then you pretty much have to try to Open each one in a try...catch block and use only those that don't fail. There is no "IsFree" property for a comport and "IsOpen" only tracks ports within the...
4 May 2014 by Member 10779179
How do I get the RS232 ports that are being used? This is the code that I came up with.using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.IO.Ports;using...
7 Apr 2014 by varun mishra
Hi Guys,Issue is solved. I had to add wait till InQueue > 0 (it means there is atleast 1 byte in receive buffer) or timeout (as safety exit) is over. it would be blocking call but it is OK for my application at the moment. waitComm() did not work well for me here.sample...
20 Mar 2014 by glennPattonWork3
I have hacked a solution together to allow me to proceed below: Private Sub btnRE_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRE.Click rtbIncomingATE.Text = "" TmrNoDataAtPortATE.Enabled = True Reply_Status = REPLY_ATE.NO_REPLY ...
20 Mar 2014 by Mike Meinz
Instead of Me.BeginInvoke(New SetTextCallbackATE(AddressOf SetTextATE), New Object() {InputData})Why don't you just call SetTextATE as follows:Call SetTextATE(InputData)
20 Mar 2014 by glennPattonWork3
Hi All,In my battle with VB I have no got solid reliable comms with the Unit Under Test.I can get it to reply to a rich text box, how ever I want to get the complete replyIf I monitor it in the below function Private Sub port_DataReceived_ATE(ByVal sender As Object, ByVal e As...
19 Mar 2014 by Mike Meinz
In VB.NET, you can add a Handles clause to a procedure and it will be recognized as the event handler. Private Sub port_DataReceived_1(ByVal sender As Object, _ ByVal e As SerialDataReceivedEventArgs) Handles AteComPort.DataReceived NoDataAtPort.Enabled = False ...
19 Mar 2014 by glennPattonWork3
Hi All,My latest question from the wonderful hacking job I am doing is 'Am I attaching the event handler right?' I am trying to get some code working, I have written bits and pieces and would like to get it all in one program. In the test bit of code I have AddHandler...