Click here to Skip to main content
15,891,943 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm coding in Visual C#. One task is to uplaod a file to an ftp-Server. In the filename # have to be used. Uploading the files with a *.bat works fine, but doing it in my app leads to filename on the ftp-Server, where only the letters before the first appearance of # is used.

In the debugger the ftp-path inclusive filename is shown correctly.

Any suggestions welcomed.

Thx

macrene
Posted

It seems to be an encoding issue, or the FTP client class you use has a bug. What are you using? Have you tried the same path name using a normal FTP client? If it works trace the communication with a network sniffer, and see how it is encoded. Trace your app also and see the difference. Theoretically hashmark is allowed by the RFC. But be aware that FTP is not UTF-8 compliant, only when complies with RFC 2640.
 
Share this answer
 
Comments
macrene 14-Jun-12 10:07am    
I solved it, before I read your answer, so thank you very much in anyway.
Instead of "#" in the FTP-path "%23" must be used.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900