title: Unable to read file from isolated storage in WP7
body: <p>My code looks like below:</p>
  
  <pre><code>private void LayoutRoot_Loaded(object sender, System.Windows.RoutedEventArgs e)
      {
          // TODO: Add event handler implementation here.
          try
          {
              string fileName = NavigationContext.QueryString["id"];
              DataSaver&lt;SampleData&gt; mypersonaldata = new DataSaver&lt;SampleData&gt;();
              var PersonData = mypersonaldata.LoadMyData(fileName);
  
              txtName.Text = PersonData.Name;
              txtAge.Text = PersonData.Age;
              txtheight.Text = PersonData.Height;
              txtMammals.Text = PersonData.FavMammals;
              txtBirds.Text = PersonData.FavBirds;
              txtReptiles.Text = PersonData.FavReptiles;
          }
          catch
          {
              MessageBox.Show("Unable to read!");
          }
      }
  </code></pre>
  
  <p>Here is my code for loading data:</p>
  
  <pre><code>public MyDataType LoadMyData(string sourceName)
  {
      MyDataType retVal = default(MyDataType);
      string TargetFileName = String.Format("{0}/{1}.dat", TargetFolderName, sourceName);
      if (IsoFile.FileExists(TargetFileName))
          using (var sourceStream = IsoFile.OpenFile(TargetFileName, FileMode.Open))
          {
              retVal = (MyDataType)_mySerializer.ReadObject(sourceStream);
          }
      return retVal;
  }
  </code></pre>
  
  <p>I am able to access the member of the DataSaver.cs and SampleData.cs. I am getting the correct filename also but unable to read the data. Please help!</p>
  
  <pre><code>    public void SaveMyData(MyDataType sourceData) 
      { 
          string TargetFileName = String.Format("{0}/{1}.dat", TargetFolderName, targetFileName); 
  
          if (!IsoFile.DirectoryExists(TargetFolderName)) 
              IsoFile.CreateDirectory(TargetFolderName); 
  
          try 
          { 
              using (var targetFile = IsoFile.CreateFile(TargetFileName)) 
              { 
                  _mySerializer.WriteObject(targetFile, sourceData); 
              } 
          } 
          catch (Exception e)
          {
              IsoFile.DeleteFile(TargetFileName); 
          }
      }    
  </code></pre>
  
  <p>The above code is for saving data into Isolated Storage.</p>