Posted on: 6/10/2011 3:44:12 AM | Views : 571

I’m attempting to upload a file via FTP and need it to keep the %20 in its file name…
System.Text.Encoding enc = System.Text.Encoding.ASCII; byte[] fileContent = enc.GetBytes("<b>Just Testing some new bold stuff</b>"); WebClient request = new WebClient(); request.Encoding = System.Text.Encoding.ASCII; request.Credentials = new NetworkCredential("user", "pass"); request.UploadData("ftp://blah/hello%20world.txt", fileContent); However when looking at the file after it was uploaded, it loses its %20 and displays as ‘hello world.txt’.  Furthermore, the FTP log show it coming through as: 17:09:46 10.10.1.1 [83]created  /hello+world.txt 226 0
Any idea how I can get it to retain its %20 in the file name?
...

Go to the complete details ...