Re: Cannot use CopyTo() on IIS 7 (windows vista)

  •  01-09-2012, 8:39 AM

    Re: Cannot use CopyTo() on IIS 7 (windows vista)

    It is ASPX 
     
    <script runat="server">
        void InsertMsg(string msg)
        {
            ListBoxEvents.Items.Insert(0, msg);
            ListBoxEvents.SelectedIndex = 0;
        }
        void Uploader_FileUploaded(object sender, UploaderEventArgs args)
        {
            Uploader uploader = (Uploader)sender;
            InsertMsg("File uploaded! " + args.FileName + ", " + args.FileSize + " bytes.");
                       
            //Copys the uploaded file to a new location.
            String str_saveas = Server.MapPath("~/UploadFile/");
            args.CopyTo(str_saveas + args.FileName);              
            //You can also open the uploaded file's data stream.
            //System.IO.Stream data = args.OpenStream();
        }
    </script>
View Complete Thread