Are you using the SerialPort class for the connection.The error may be due to the invalid port name.The following code works fine here.Try this,
To Create the connection,
SerialPort port = new SerialPort("COM1");
To Opens the port
if (false == port.IsOpen)<br />
{<br />
port.Open();<br />
}
To Write the data
port.Write("test");
Regards,
Vineeth