title: Not able to save/download file on local pc. File is available inside code in byte[]
body: <p>I am working on SharePoint web application backend c# and hosted on azure.
  Basically I working on virtual machine. Using citrix to access pc.</p>
  <p>I have file data in format of byte[] array in side code and want to save/download it on local, but I am not able to do that.</p>
  <p>For download I used response streams
  Example :- Response.output (data) / Response.Binarywrite(data).</p>
  <p>This didn't work</p>
  <p>Or</p>
  <p>To save on local I used desktop path</p>
  <pre><code>string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
  </code></pre>
  <p>Above code return some different location which is not accessible for me.</p>
  <blockquote>
  <p>Error : D:/Windows/System32 not accessible.</p>
  </blockquote>
  <p>Previously I used above code to access desktop it always work without any error.
  But looks like as I am working on virtual machine and application is also hosted on azure that's why it's returning some different path.</p>
  <p>Please help me. How I can save/download file on my local?</p>
  <p>Thanks in advance.</p>