title: Saving file to App_Data doesn't seem to work when app is uploaded to Azure
body: <p>I have a small MVC 5 app, and the point is that it works all fine in my localhost, but when I publish it to Azure, some parts doesn't work. For example, I have something like this in my view:</p>
  
  <pre><code>&lt;div class="form-group"&gt;
         &lt;div style="position:relative;"&gt;
              &lt;label&gt;Image&lt;/label&gt;
              &lt;a class="btn" href="javascript:;"&gt;
              Choose a file...
              &lt;input type="file" name="Image" accept="image/jpeg, image/png"
                        style="position:absolute;z-index:2;top:0;left:0;filter: alpha(opacity=0); opacity:0;background-color:transparent;color:transparent;"
                         onchange='$("#upload-image-info").html($(this).val());' /&gt;
             &lt;/a&gt;
             &lt;span class="label label-info" id="upload-image-info"&gt;&lt;/span&gt;
         &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>So, then in my server side I have something like this:</p>
  
  <pre><code>    public ActionResult ServiceRequest(RequestViewModel rvm, HttpPostedFileBase image = null, HttpPostedFileBase video = null)
      {
          tmpPicturePath = Server.MapPath("~/App_Data/Uploads/Images");
          tmpVideoPath = Server.MapPath("~/App_Data/Uploads/Videos");
  
          // I check for some properties, and then save the file
          filename = Path.GetFileName(image.FileName);
          imagePath = Path.Combine(tmpPicturePath, filename);
          image.SaveAs(imagePath);
  
          // Afterwards, I give the imagePath to SendGrid for attachment to a mail
          message.AddAttachment(imagePath);
  
          // And later in code, I send the mail
          transportWeb.Deliver(message);
       }
  </code></pre>
  
  <p>Please note that I omitted some parts of my code above, to make it more clear about what I want to do. The point is that in my localhost, it works fine, I am able to select a file and after uploading it, sends it via e-mail. But, when I publish the website on Azure, and try the same thing, when I press the button it seems like it is uploading the file, but afterwards I get an error message saying:</p>
  
  <blockquote>
    <p>Error. An error occurred while processing your request.</p>
  </blockquote>
  
  <p>I don't know whether it cannot store the files on server, or cannot read them afterwards for attachment, or cannot send the mail. Any idea about what the problem may be?</p>