I’m using a network stream to read data from network in an ASP.NET application and I get this error while trying to read from the stream:
stream does not support concurrent IO read or write operations
It happens sometimes. Any idea ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It sounds simply as though you are trying to do two different operations on the same stream at the same time from different threads. Adding a
lock(Monitor) orMutexshould help synchronise access to the stream.