Click here to Skip to main content
15,919,613 members
Home / Discussions / C#
   

C#

 
QuestionHow to have a "Loading..." Form Pin
shultas25-Aug-09 5:57
shultas25-Aug-09 5:57 
AnswerRe: How to have a "Loading..." Form Pin
DaveyM6925-Aug-09 6:22
professionalDaveyM6925-Aug-09 6:22 
QuestionHow to rebuild a struct from bytes after transfer [C#] Pin
Shaitan0025-Aug-09 4:46
Shaitan0025-Aug-09 4:46 
AnswerRe: How to rebuild a struct from bytes after transfer [C#] Pin
stancrm25-Aug-09 5:20
stancrm25-Aug-09 5:20 
AnswerRe: How to rebuild a struct from bytes after transfer [C#] Pin
DaveyM6925-Aug-09 7:24
professionalDaveyM6925-Aug-09 7:24 
QuestionCompile errors in Release mode while there are no errors in Debug mode Pin
NarVish25-Aug-09 4:38
NarVish25-Aug-09 4:38 
AnswerRe: Compile errors in Release mode while there are no errors in Debug mode Pin
Hristo-Bojilov25-Aug-09 7:07
Hristo-Bojilov25-Aug-09 7:07 
QuestionThe stream does not support concurrent I/O read or write operations Pin
mbyamukama25-Aug-09 3:38
mbyamukama25-Aug-09 3:38 
I am writing a multithreaded application. A download manager to be precise. When downloading one file, everything is quite fine. The thread starts, downloads the file and terminates as expected. When i start another download thread, however, when the first is still running, i get the error above 9in the subject). The problem is on this line of code which is meant to create a new filestream and write the retrieved data to the stream.
strLocal = new FileStream(Application.StartupPath+"\\"+SaveAsTextBox.Text,FileMode.Create, FileAccess.Write,FileShare.ReadWrite);

The download method is called Download(), is void and does not take any arguments.
A thread is started using
DownloadThread[j] = new Thread(new ThreadStart(Download));<br />
      DownloadThread[j].Start();<br />


where j has a value incremented per click, so as to start a new thread each time.
What i do not understand is that the exception seems to suggest that 2 write operations are requesting to be handled by the same stream, yet it is actually a different stream because the user changes the SaveAsTextBox.Text on every new download.
Any answers?

BHM

AnswerRe: The stream does not support concurrent I/O read or write operations Pin
riced25-Aug-09 6:51
riced25-Aug-09 6:51 
Question[Message Deleted] Pin
ankitjain111025-Aug-09 2:56
ankitjain111025-Aug-09 2:56 
AnswerRe: how to dispaly some specific values from databse into datagrid view...am using microsoft access Pin
Henry Minute25-Aug-09 3:01
Henry Minute25-Aug-09 3:01 
AnswerRe: how to dispaly some specific values from databse into datagrid view...am using microsoft access Pin
Vasudevan Deepak Kumar25-Aug-09 3:03
Vasudevan Deepak Kumar25-Aug-09 3:03 
AnswerRe: how to dispaly some specific values from databse into datagrid view...am using microsoft access Pin
Keith Barrow25-Aug-09 3:05
professionalKeith Barrow25-Aug-09 3:05 
AnswerRe: how to dispaly some specific values from databse into datagrid view...am using microsoft access Pin
Blue_Boy25-Aug-09 3:06
Blue_Boy25-Aug-09 3:06 
AnswerRe: how to dispaly some specific values from databse into datagrid view...am using microsoft access Pin
ankitjain111025-Aug-09 3:20
ankitjain111025-Aug-09 3:20 
QuestionC# FTP Site Creation on IIs 5.1 ( System.DirectoryServices) Pin
MikeSharp25-Aug-09 2:44
MikeSharp25-Aug-09 2:44 
AnswerRe: C# FTP Site Creation on IIs 5.1 ( System.DirectoryServices) Pin
Vasudevan Deepak Kumar25-Aug-09 3:12
Vasudevan Deepak Kumar25-Aug-09 3:12 
GeneralRe: C# FTP Site Creation on IIs 5.1 ( System.DirectoryServices) Pin
MikeSharp25-Aug-09 6:39
MikeSharp25-Aug-09 6:39 
QuestionCustomizing a Windows Form Pin
Etienne_12325-Aug-09 2:24
Etienne_12325-Aug-09 2:24 
AnswerRe: Customizing a Windows Form Pin
pelnor25-Aug-09 3:44
pelnor25-Aug-09 3:44 
Questiondata gridview error Pin
myinstincts25-Aug-09 1:26
myinstincts25-Aug-09 1:26 
AnswerRe: data gridview error Pin
padmanabhan N25-Aug-09 1:53
padmanabhan N25-Aug-09 1:53 
QuestionBinding 2 data tables to a single data grid Pin
myinstincts25-Aug-09 0:43
myinstincts25-Aug-09 0:43 
AnswerRe: Binding 2 data tables to a single data grid Pin
padmanabhan N25-Aug-09 0:51
padmanabhan N25-Aug-09 0:51 
Questionhow to pass the values between the datagridview's in different pages Pin
Anjani Poornima25-Aug-09 0:20
Anjani Poornima25-Aug-09 0:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.