title: Unable to open serial port in .NET
body: <p>I am trying to open COM1, but get a strange error every time I call <code>SerialPort.Open()</code>.</p>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>The given port name does not start with COM/com or does not resolve to a valid serial port.
    Parameter name: portName</p>
  </blockquote>
  
  <p>The code is very simple:</p>
  
  <pre><code>SerialPort port = new SerialPort("COM1", 19200, Parity.None, 8, StopBits.One);
  port.Handshake = Handshake.RequestToSend;
  port.Open();
  </code></pre>
  
  <p>If I call <code>SerialPort.GetPortNames()</code>, it returns one port called "COM1".</p>
  
  <p>I've verified that I have a "COM1" on my computer, and I'm not using it in any other applications. When I run the code on another computer, it works. My system is running Windows Vista. The version of .NET is 2.0.</p>
  
  <p>Is there a security setting I have to change somewhere? I'm logged in as an admin, and have UAC turned off.</p>
  
  <hr>
  
  <p><strong>More info</strong></p>
  
  <p>I used Process Explorer and confirmed that nothing is using \Device\Serial0.</p>
  
  <hr>
  
  <p><strong>Workaround</strong></p>
  
  <p>I installed a USB-Serial adaptor (COM3), and it works fine. Go figure. There must be a problem with COM1.</p>