Exception: Cannot create a file when that file already exists.

  •  08-30-2010, 10:32 AM

    Exception: Cannot create a file when that file already exists.

    Hi guys,
     
    I have a problem when I try to call method MoveTo to move all the uploaded files to our directory.
    1. void Uploader_FileUploaded(object sender, UploaderEventArgs args)    
    2. {    
    3.      args.MoveTo(Server.MapPath("~/Uploads/"));    
    4. }   
    Here is the message of that exception:

    Cannot create a file when that file already exists.

    I need your advice on this.
    Thanks in advance!
     
    Regards,
    Tien
    Filed under:
View Complete Thread