我使用的是网络数据流中读取一个 ASP.NET
应用程序从网络数据,我得到这个错误,而试图从流中读取:
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:
流不支持并发IO读取或写入操作
这有时会发生。你知道吗?
It happens sometimes. Any idea ?
这听起来简直好像你正试图从不同的线程在同一时间做同流两种不同的操作。添加锁定
(显示器
)或者互斥
应有助于同步进入流
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
) or Mutex
should help synchronise access to the stream.