title: Access to path is denied when trying to upload file
body: <p>Access to the path <code>D:\Hosting\10983309\html\sunithahome\images\GallerySunithaHA\IMG_7162.jpg</code> is denied.
  I have find this error when I try to upload an Image in GallerySunitha Folder.</p>
  
  <p>How can I solve this problem?</p>
  
  <pre><code>if (FileUploadGlry1.HasFile)
      {
          string FileName = Path.GetFileName(FileUploadGlry1.PostedFile.FileName);
          FileUploadGlry1.SaveAs(Server.MapPath("~/images/GallerySunithaHA/" + FileName));
          con.Open();
          query = "insert into Gallery(ImageName,Caption,ImagePath) values(@Iname,@Cap,@Ipath)";
          Sqlcmd = new SqlCommand(query, con);
          Sqlcmd.Parameters.AddWithValue("@Iname", FileName);
          Sqlcmd.Parameters.AddWithValue("@Ipath", "~/images/GallerySunithaHA/" + FileName);
          Sqlcmd.Parameters.AddWithValue("@Cap", TextBoxGalleryCaption1.Text);
          Sqlcmd.ExecuteNonQuery();
          PanelViewImage.Visible = true;
          con.Close();
          TextBoxGalleryCaption1.Text = "";
      }
  </code></pre>