Fileupload saveas method doesn't overwrite
<p>I have a very simple requirement, there's a folder containing an image file, I have a form with only one upload field to select an image and save it with the same existing image name to overwrite it</p>

<pre><code>protected void ChangeLogo(object sender, EventArgs e)
    {   
        if (!ImageUpload.HasFile)
        {
            ShowPopup("Logo Upload Canceled", "Please upload the image for the logo.", "stop");
        }            
        else //save the image
        {
            string logoPath = Server.MapPath("~/images/home/");
            string filename = "logo.png";

            ImageUpload.SaveAs(logoPath + filename);
        }
    }
</code></pre>

<p>I am getting an error:
Access to the path 'C:\inetpub\wwwroot\website\images\home\logo.png' is denied
even though there's full access control on the folder but if i saved it with a different name it works, it only refuses to overwrite and I need to overwrite. I thought of first deleting the image then saving, but this is silly, why can't I overwrite?</p>

<p>Thanks in advance</p>
