unable to copy to another folder at same level in the website as uploadertemp folder

Last post 11-22-2008, 1:55 PM by jmestep. 1 replies.
Sort Posts: Previous Next
  •  11-22-2008, 12:37 PM 46163

    unable to copy to another folder at same level in the website as uploadertemp folder

    I have run into an error message with the uploader. I am saving the files to \UploaderTemp, but when I try to copy to another folder, I get an error.
    I have made a new folder \OrderUploads the same level as the \UploaderTemp and it has the same permissions.
    In the code I have 
    args.CopyTo(\\OrderUploads);
    When I do that, then the uploader gives me the message that access is denied to that folder. Both ASPNET and NETWORK SERVICE have the same permissions.
    Is there something else I need to do? I don't really need to copy the files to another folder if I can rename them as they are uploaded.
  •  11-22-2008, 1:55 PM 46164 in reply to 46163

    Re: unable to copy to another folder at same level in the website as uploadertemp folder

    I think I just found the answer in this post:
    private void Uploader1_FileUploaded(object sender, UploaderEventArgs args)
    {
          string folder=Server.MapPath("~/UploadFiles/");
          string mypath=Path.Combine(folder,args.FileName);
          args.MoveTo(mypath);
    }
View as RSS news feed in XML