When trying to create a folder on microsoft azure website in visual studio asp.net i get error: System.UnauthorizedAccessException
<p>I've only got 4 users on my pc, all have full control over everything on the directory, and i get this error in local (debug) mode, and in azure.</p>

<p>What im doing is trying to create a folder for a user to upload their files:</p>

<pre><code>if (!Directory.Exists("~/"+Session["user_id"]+"/"))
{
    Directory.CreateDirectory("~/" + Session["user_id"] + "/");
}
if (FileUpload1.HasFile)
{
    FileUpload1.PostedFile.SaveAs(Server.MapPath("~/" + Session["user_id"] + "/") + FileUpload1.FileName);
}
</code></pre>

<p><strong>What fixed it</strong></p>

<pre><code>string mapa = (Path.Combine(HttpContext.Current.Server.MapPath("~/Content/" + Session["user_id"].ToString() + "/")));
            if (!Directory.Exists(mapa))
            {
                Directory.CreateDirectory(mapa);
            }

 FileUpload1.PostedFile.SaveAs(Server.MapPath("~/Content/" + Session["user_id"].ToString() + "/") + FileUpload1.FileName);
</code></pre>

<p>This works locally, im still working on azurewebsites though</p>