title: How to authorize access to the application path?
body: <p>I want to create a file <code>mytest.txt</code> in my UWP app, but I always get the exception</p>
  
  <blockquote>
    <p>UnauthorizedAccessException access to the path is denied</p>
  </blockquote>
  
  <p>When I call:</p>
  
  <pre><code>string destinationPath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData), "mytest.txt");
  FileStream fs = File.Create(destinationPath);
  </code></pre>
  
  <p>I tried with <code>System.Environment.SpecialFolder.MyDocuments</code> too and get the same exception. I'm also debugging my app in Visual Studio opened with <code>Run as administrator</code>.</p>
  
  <p>Note: This is actually a UWP app with Xamarin.Forms, but I don't think that's relevant.</p>