title: UnauthorizedAccessException on reading file
body: <p>I have and ASP Web API and I'm trying to return a file from a call there.</p>
  
  <p>On my server I keep getting the error:</p>
  
  <blockquote>
    <p>System.UnauthorizedAccessException: Access to the path
    'E:\Data\Docs\specific\document.pdf' is denied.    at
    System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)<br>
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
    access, Int32 rights, Boolean useRights, FileShare share, Int32
    bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String
    msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)<br>
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
    access, FileShare share, Int32 bufferSize, FileOptions options, String
    msgPath, Boolean bFromProxy)    at System.IO.FileStream..ctor(String
    path, FileMode mode)    at
    GIS.Backend.Assets.BLL.Document.GetByUrl(String url)    at
    GIS.Backend.Assets.WebApi.Controllers.DocumentController.Get(String
    url)</p>
  </blockquote>
  
  <p>I'm guessing this is where it goes wrong:</p>
  
  <pre><code>string documentenPath = System.Web.Configuration.WebConfigurationManager.AppSettings["DocumentenDir"].ToString();
          string fullUrl = documentenPath + url;
  
          Stream file = new FileStream(fullUrl, FileMode.Open);
          return file;
  </code></pre>
  
  <p>I have set IIS_IUSRS to have read access to the 'Docs' folder, so it should be able to read right?</p>