title: Issues with StreamReader, ThreadSafety and Read Mode
body: <p>I have following code to read a file </p>
  
  <pre><code>StreamReader str = new StreamReader(File.Open(fileName, FileMode.Open, FileAccess.Read));
  string fichier = str.ReadToEnd();
  str.Close();
  </code></pre>
  
  <p>This is part of a asp.net webservice and has been working fine for an year now in production. Now with increasing load on server, customer has started getting "File already in use" error. That file is being read from  this code and is never written to from application. </p>
  
  <p>One problem that I clearly see is that we are not caching the contents of file for future use. We will do that. But I need to understand why and how we are getting this issue.</p>
  
  <p>Is it because of multiple threads trying to read the file? I read that StreamReader is not thread safe but why should it be a problem when I am opening file in Read mode?</p>