title: Stream was not writeable (StreamWriter)
body: <p>I'm trying to remove specific line from file on IsolatedStorage but I'm still receiving the "Stream was not writeable" from following method:</p>
  
  <pre><code>public async static void RemoveFavoriteFromFile(int id)
  {
      string favoriteFilename = Globals.FavoriteFilepath;
      StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
      var folder = await local.GetFolderAsync("DataFolder");
      var file = await folder.OpenStreamForReadAsync(Globals.FavoriteFilepath);
      using (StreamReader sr = new StreamReader(file))
      {                
          using (StreamWriter sw = new StreamWriter(file))
          {
              string line = null;
              while ((line = sr.ReadLine()) != null)
              {
                  if (String.Compare(line, id.ToString()) == 0)
                      continue;
                  sw.WriteLine(line);
              }
          }
      }
  }
  </code></pre>
  
  <p>on line <code>using (StreamWriter sw = new StreamWriter(file))</code></p>
  
  <p>Could anybody help me please? </p>
  
  <p>Thanks in advance</p>
  
  <p><strong>EDIT:</strong> I would mainly ask you to advice me how to remove specific line from existing file, no matter what I created already. Main issue for me in meaning of understanding is that how to write/edit a file which I firstly need to read for finding the specific line.</p>