I am running .Net 3.5 application on a new version of Windows XP. This application writes and reads some data through the serial port (COM). The application works fine on my laptop (Windows XP Professional), but not on the built-in Windows XP. I keep getting this error:
System.IO.IOException: An I / O operation was aborted due to a stream or application request.
What could be the reason for this?
Additional info: read, I use ReadExisting , not Readline . Also, before reading, I am sure that the port is also open.
System.IO.IOException: The I/O operation has been aborted because of either a thread exit or an application request. at System.IO.Ports.SerialStream.EndRead(IAsyncResult asyncResult) at System.IO.Ports.SerialStream.Read(Byte[] array, Int32 offset, Int32 count, Int32 timeout) at System.IO.Ports.SerialStream.Read(Byte[] array, Int32 offset, Int32 count) at System.IO.Ports.SerialPort.ReadExisting() at ScalesApp.Scales.handleDataReceived(Object sender, SerialDataReceivedEventArgs e) at System.IO.Ports.SerialPort.CatchReceivedEvents(Object src, SerialDataReceivedEventArgs e) at System.IO.Ports.SerialStream.EventLoopRunner.CallReceiveEvents(Object state) at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack) at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
source share