title: When uploading an image/file to server, ServiceStack throws a UnauthorizedAccessException
body: <p>I used the following code from the answer to this question by @scott <a href="https://stackoverflow.com/questions/25886245/how-do-i-upload-an-image-to-a-servicestack-service">How do I upload an image to a ServiceStack service?</a>  </p>
  
  <pre class="lang-cs prettyprint-override"><code>[Route("/upload","POST")]
  public class UploadFileRequest
  {
      // Example of other properties you can send with the request
      public string[] Tags { get; set; }
  }
  
  class MyFileService : Service
  {
      public bool Post(UploadFileRequest request)
      {
          // Check a file has been attached
          if(Request.Files == null || Request.Files.Length == 0)
              throw new HttpError(400, "Bad Request", "No file has been uploaded");
  
          // Save the file
          Request.Files[0].SaveTo(Request.Files[0].FileName);
  
          // Maybe store the tags (or any other data in the request)
          // request.Tags
  
          return true;
      }
  }
  </code></pre>
  
  <blockquote>
    <p>Then with the <code>JsonServiceClient</code> in your Android app, then your simply need to do this:</p>
  </blockquote>
  
  <pre class="lang-cs prettyprint-override"><code>var filename = "cab.jpg"; // The path of the file to upload
  var client = new JsonServiceClient("http://212.175.132.168/service/api/");
  using(var fileStream = File.OpenRead(filename))
  {
      client.PostFileWithRequest&lt;bool&gt;(fileStream, "cab.jpg", new UploadFileRequest { Tags = new[] { "Cab", "Taxis", "NewYork", "Yellow" }});
  }
  </code></pre>
  
  <p>I used this with my DTO and in my Android app, but when I try to send it always fails with the following server error:</p>
  
  <pre><code>{"ResponseStatus": {"ErrorCode":"UnauthorizedAccessException","Message":"'C:\\Windows\\SysWOW64\\inetsrv\\a.png' path denied.", 'C:\Windows\SysWOW64\inetsrv\a.png' path denied.
  </code></pre>
  
  <p>Can anyone share Monodroid ServiceStack Image upload sample?</p>
  
  <p>Thanks.</p>