EXCEPTION: System.IO.IOException: Insufficient system resources exist to complete the requested service

Hello Experts,

I'm working on Windows application, talking to a Device on Virtual COMM.

It fails to communicate the device and throws this exception:

EXCEPTION: System.IO.IOException: Insufficient system resources exist to complete the requested service.
 
   at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
   at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)
   at System.IO.Ports.SerialPort.Open()
   at Tel.SetComm.Serial.Port.Open()
   at TelComm_Library.CSet.Test(Int32 maxAttempts)


I see the  Virtual Comm port on my device manager, but still cannot open the comm port.

But in the past, I talked to the same device multiple times with different Virtual comm#.
 
ASPDEVAsked:
Who is Participating?
 
Miguel OzConnect With a Mentor Software EngineerCommented:
It may be a service pack or hot fix introducing the issue described here:
http://zachsaw.blogspot.com/2010/07/net-serialport-woes.html
0
 
SAMIR BHOGAYTAFreelancer and IT ConsultantCommented:
Hi, you use the memory flush() function for solving the above exception.
0
 
ASPDEVAuthor Commented:
Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.