System.ArgumentException: The given port name does not start with com/com or does not resolve to a valid serial port

Source: Internet
Author: User
Tags visual studio 2010
Problem Description:

The program has been working normally, today the computer re-made the system, and then began to appear this problem: "The given port name does not start with com/com or resolves to a valid serial port." Serial debugging assistant is also not used. Serial cable is not a problem, it is not a hardware problem, the program is not a problem (normal operation on other computers).

Exception information:

{system.argumentexception: The given port name does not start with com/com or does not resolve to a valid serial port.
Parameter name: PortName
In System.IO.Ports.SerialStream. ctor (String portname, Int32 baudrate, Parity Parity, Int32 databits, StopBits stopbits, Int32 readtimeout, Int32 writetime Out, handshake handshake, Boolean dtrenable, Boolean rtsenable, Boolean discardnull, Byte parityreplace)
In System.IO.Ports.SerialPort.Open ()
In Oste_Scan500wpf.Serial.OpenPort () location d:\ My Documents \visual Studio 2010\projects\******* \serial.cs: line number 70}

Exception Reason:

It turned out that the Adobe PDF printer was using serial 1 (COM1), which prevented the program from opening serial 1.

Problem solving:

It would be nice to change the port of Adobe PDF to a different port.

System.ArgumentException: The given port name does not start with com/com or does not resolve to a valid serial port

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.