Click here to Skip to main content
15,884,989 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 Score

Ports 

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...
10 Dec 2013 by Sergey Alexandrovich Kryukov
When you decide what port number to use, always consult original IANA document of latest version: http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml[^].About...
11 Jun 2013 by Ron Beyer
cmd>netstat -b -aThat should get you what program is using which 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) { ...
21 Aug 2015 by Member 11915058
OMG!I found it, in port settingDtrEnable=TrueKudos for Ed Tenholder
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.
7 Jan 2013 by leprechauny
for (int currPort = firstInterval; firstInterval
7 Jan 2013 by fjdiewornncalwe
You just need to create threadsafe calls:How to: Make Thread-Safe Calls to Windows Forms Controls[^]
24 Feb 2013 by H.Brydon
I think you are looking at the problem the wrong way. You are asking software questions when you should be thinking hardware.The Raspberry Pi computer (generally linux) has the GPIO, I2C and other ports you are talking about. These are not generally available on standard PC machine...
29 May 2013 by Sudhakar Shinde
You can change sql sever port so that 80 will be available for Wamp server. Here is [LINK] to understand how change sql server port.
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...
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...
11 Mar 2015 by Richard Deeming
Have a look at this article:Retrieving IP and MAC addresses for a LAN[^]
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[^]
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.
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...
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...
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...
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...
17 Dec 2012 by maysam gamini
I need to establish remote WMI Connections from a Windows Server 2008 with static port.I know that WMI calls use port 135 and then chooses a random port, what I would like to know is if WMI can be set to use a static port?Yes I have already read THIS: Setting Up a Fixed Port for...
22 Dec 2012 by sahrarainmelody
hi i am writing a program for recieving data from a rs232 serialport . i want to receive whole of data and i try to use of "serin" command ... but it doesnt work how can i fix this problem thanks for time
22 Dec 2012 by Abhishek Pant
see example here how to use it.It can help you -serin-syntax[^]
6 Jan 2013 by Trevor Johansen
Just a quick question. I have an app that uses mono and this app needs to communicate with something via a serial port at 256000 baud. I can connect to the hardware via "gtkterm /dev/ttyUSB0 250000" but in the mono app I do not get any errors or any communications at all.Someone mentioned...
7 Jan 2013 by Tharaka MTR
Yes, you are write.this cross domain error will occur when the following lines executeresultTxt.AppendText("Port " + currPort + " open\r\n");resultTxt.AppendText("Port " + currPort + " closed\r\n");That because, you are going to access the Main Thread control within the background...
14 Jan 2013 by DemeCarv
I am following the JEE6 Tutorial. I installed SDK with GlassFish and after NetBeans. While installed GlassFish from SDK I wasn't able to use port 8080 because it was used by OracleXE. Then I chose 8081. Now when I am trying to deployed a simple project to GlassFish I couldn't. It is strange to...
15 Jan 2013 by Richard MacCutchan
I presume you are referring to Simple Serial Port Monitor[^], in which case, please post your question in the forum at the end of the article.
23 Feb 2013 by hor_313
hii want to learn how can i use my computer as a mind of a system like robot or etc.or use of mini-computer boards that have possiblity to run operating systems seems linux.i searched a lot for it but i didnt success to find good results.may anyone helps me?
24 Feb 2013 by CPallini
You usually don't connect directly I/Os to the PC. Instead you connect the PC (via a virtual COM over USB, for instance) to a microcontroller[^], the latter, in turn, handles directly the I/Os.
6 Apr 2013 by Sandeep Mewara
It does not work like this here.Here is what is expected of enquirers:1. TRY first what you want to do! You may find that it's not that hard.2. Formulate what was done by you that looks like an issue/not working. Try them and tell if you face issues.Members will be more than happy...
2 May 2013 by evanharijanto
Hi all, I'd like to ask a question.I would like to receive a data from an UDP port and display the data as string.here is my trial code, but it doesn't works.it is stated in the error message that it can't bind and also stated socket.bind(native method)I am still don't understand...
2 May 2013 by AlphaDeltaTheta
Well, your code is absolutely correct there is no issues with it.You are encountering a bind exception. Such exceptions occur if the underlying operating system is unable to create an socket at the specified port. It might be for the following reasons:1. The port 53 is already in use. In...
2 May 2013 by AlphaDeltaTheta
Well, your has no issues with it. Except for the thing that the constructor used to create a datagram socket for receiving must not include the ip address. It should be like thisDatagramPacket p = new DatagramPacket(buffer, buffer.length);You are encountering a bind exception. Such...
2 May 2013 by evanharijanto
solved!! thanks everyone!!here is the code I have made after some confusing period.import java.io.IOException;import java.net.DatagramPacket;import java.net.DatagramSocket;import java.net.InetAddress;import java.net.SocketException;public class udp_test{ public static void...
5 May 2013 by evanharijanto
hello everyone, I'd like to ask why is this error occurs.I am trying to get a string data from a device. I have make this code and it runs well when I try to obtain data from a local server, but it stated this error when it connects to the device.java.net.PortUnreachableException: ICMP...
17 May 2013 by Sergey Alexandrovich Kryukov
How a serial port can depends on Metro style? Ever heard of separation of concerns?Check out: http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx[^].—SA
27 May 2013 by Himu from Orissa
Aam trying to populate list of available ports in my system.Following is my code which works in windows xp, but does not work in windows 7public void loadPorts() { try { ManagementObjectSearcher searcher = new...
28 May 2013 by OriginalGriff
Try:string[] ports = SerialPort.GetPortNames();foreach (string p in ports) { Console.WriteLine(p); }
29 May 2013 by FM7
helloi have SQL SERVER 2008 on my system(os 7)i install Wamp Server 2.1 it is not active to see PhpMyAdmin.(because of port 80)to solve this problem i have to stop SQL REPORTING SERVICE from services list to free port 80,and Wamp server will work.Now problem is:Every time i restart my...
11 Jun 2013 by Infinity Signal
I have installed easy PHP and xampp and problem I faced with both is that apache is not running because port 80 is in use. I want to know that which software is using port 80,how can I find out?I am using windows 7. I have closed skype which uses port 80 but still it says that port 80 is in use.
15 Jun 2013 by zizu50
I have raspberry Pi . I use it as a server. I wanna get commands with clients (other devices like android devices) and control microcontroller with UART serial port. I wrote async TCP Socket server with mono C#. Like [this]. http://msdn.microsoft.com/en-us/library/fx6588te.aspxI can use UART...
18 Jun 2013 by amir tarek
I can access any COM Port using SerialPort class in c#and also i can use the CreateFile API to get handle for Com and use to communicate withis this a difference between these two method?as if i can't do connection to Com using SerialPort can i do this using CreateFile API?
30 Jul 2013 by sugin.se
am Working with Asterisk Client softphone Design, Am using Asterisk as PBX Server, users are registered and configured to connect by UDP .But Server or client Blocks UDP connection. UDP connects via port 5060. I connects my designed softphone in this port and sends data. But i wont recieve...
10 Aug 2013 by Esmaeil Ebrahimi
hi allin csharp or vb.net i want create a program that run in background and when any document printing (really printer like canon , espon , ... and virtual printer like dopdf , ...) , one copy of document that printed , in PDF format create and save it special path on pc .Example...
10 Aug 2013 by Bhupendra Chauhan
You can use ITextSharp.ITextSharp Helper Class[^]
10 Aug 2013 by basavrajmswami
Here is good article on it Converting Image Files to PDF[^]
6 Oct 2013 by mohsenvasefi
hi to everyonei want to connect via serial port and send/receive data. I've not done it before. I need to press on button(like as OK), then send data by port to a hardware. if it has an answer, send it to PC.how can i do this? please help me
7 Oct 2013 by the vacuum
I have to prepare a c/c++ program to send a audio file(*.wav file recorded from mic input) contents through serial port in windows(using API) and to receive it at a destination system through COM port itself . I have size (100kbps) constrains in the communication technology using to transfer....
8 Oct 2013 by Richard MacCutchan
Sending any data is exactly the same regardless of its source or type. You just need to read it in blocks of some appropriate size and transmit across the interface to the receiver PC. The receiver then either stores it in a file or sends it direct to the player software. Whether you can do this...
11 Oct 2013 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/
11 Oct 2013 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
11 Oct 2013 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
23 Oct 2013 by Faaabio Martins
I already did everything to run my webservice on IIS and it is working. IIS Pool is listening to port 81, and i did port fowarding from port 8081 to port 81 inside my network, aiming for my server. When i type http://xxx.com:8081/WebServiceName.asmx it returns my web service page to consume my...
28 Oct 2013 by Faaabio Martins
Well since no one has acheived to solve this, i did port fowarding on 81 to my Web Server too and solved my problem.
11 Nov 2013 by DoingWork
Operating system: Win7Programmer (Hardware) connected at PC's parallel port.Melabs Programmer software version: v4.50 beta.on clicking "program" button, error message display "Programmer not found".While on same machine, in XP Operating system, it works fine.Anyone please help...
16 Nov 2013 by Dave Kreskowiak
Modems are not routers. They don't do port forwarding.Maybe if you were a lot more specific about the "modem" you're using and what you're really trying to do with this, we could help more.
16 Jan 2014 by Member 10529650
Error 2 symbol 'SQLServiceExec' is already defined; the first definition is in file D:\Heena\SQLAdapter_POC\SQLAdapter_POC\ProcessOrder.odx on line 303 D:\Heena\SQLAdapter_POC\SQLAdapter_POC\BizTalk Orchestration.odxand illegal name-hiding: 'SQLServiceExec' hides...
10 Mar 2014 by varun mishra
Hello Everyone,I am not writing everything again here, because lot more depth is discussed at link below.Please help.Thx,-Varunhttp://social.msdn.microsoft.com/Forums/en-US/b65e4ff9-a7ce-4818-8e36-9db75fe8f49f/usb-serial-virtual-com-port-read-not-working?forum=vcgeneral[^]
10 Mar 2014 by bling
Try turning on the DTR pin. The device may ignore input when that pin is inactive.
17 Mar 2014 by glennPattonWork3
Hi All,I have some code I have written in C# and am having to convert it to VB.NET for a purpose. I am seeing some difference in the way VB handles the Data Received event. In C# as far as I can tell data arrives at the port, the flag is raised and the data is collected to be processed. I...
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 ...
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...
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
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 ...
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...
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...
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)....
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#"[^].
30 May 2014 by jamagboo
Uninstall and reinstall COM Port on the device manager.
30 May 2014 by Herman<T>.Instance
Use sp.ReadExisting();in that case you read the complete buffer in stead of 1 line
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...
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...
16 Sep 2014 by Thanks7872
Read this : http://www.4guysfromrolla.com/articles/011404-1.aspx[^]
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...
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...
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
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...
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#?
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...
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.
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...
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,...
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...
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...
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: ...
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...
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...
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.
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, ...
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...
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?
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
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 barneyman
implement UPnP in the client program - EXACTLY designed to handle this scenarioNAT traversal[^]
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...
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...
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...
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...
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...
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/...
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).