CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Jun 2001
    Location
    Denmark
    Posts
    453

    Question Annoying FTP exception

    I have an FTP upload:

    Code:
                    FtpWebRequest ftp = 
    
    (FtpWebRequest)FtpWebRequest.Create(ftpfullpath);
                    ftp.Credentials = new NetworkCredential(username, password);
                    ftp.KeepAlive = true;
                    ftp.UseBinary = true;
                    ftp.Method = WebRequestMethods.Ftp.UploadFile;
                    FileStream fs = File.OpenRead(localFilenames[0]);
                    byte[] buffer = new byte[fs.Length];
                    fs.Read(buffer, 0, buffer.Length);
                    fs.Close();
                    ftpstream = ftp.GetRequestStream();
                    ftpstream.Write(buffer, 0, buffer.Length);
    I get an error (attachment) when I try to run the code with the following ftp path.
    ftp://penappit01/usr2/unisex/modulli...76829.fejl.xml
    It's driving me nuts - maybe I've just looked at it too long, but if someone out there can see what's wrong I'd appreciate it.
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured