title: Windows Azure access App_Data
body: <p>I need to write file to App_Data folder in Asp.Net MVC project. It works locally, but when I deployed it to Windows Azure I received error like:</p>
  
  <pre>Could not find a part of the path 'C:\DWASFiles\Sites\codehint\VirtualDirectory0\site\wwwroot\App_Data\text.txt'.</pre>
  
  <p>I need to use third party library that have to get read/write access to App_Data folder.</p>
  
  <p>I use code like this:</p>
  
  <pre><code>var path = Server.MapPath("~/App_Data/text.txt");
  using (var file = new StreamWriter(path))
  {
     file.Write("test line");
     file.Flush();
  }
  </code></pre>