Need a bit more help  
Author Message
robertje





PostPosted: Visual C# General, Need a bit more help Top

OK, I am using a FTP library to try and run a new application. I am having a huge write problem that again I'm sure is simple to fix, but I can't find the answer my self.

I want to take an html file and ftp it to my website. If I try to send a single line text file it works fine, but if I try to send ant type of complex file like an html webpage the de**** send me to this line of code

writer.Write(line, 0, line.Length);

The details say: {"Input string was not in a correct format."}. How would I make this accept a full html file or multi line text file I am using the FtpClientTester that I found somewhere online a few weeks ago.

This is the only problem I now have with my app. Please help before I go crazy and say bad words to my computer....



Visual C#11  
 
 
GavH





PostPosted: Visual C# General, Need a bit more help Top

What is 'writer' is an object from the ftp library or is a .Net object

It sounds like formatting is being applied to the string (HTML page in your case) within the .Write method and it does not understand line breaks, it could also be a conversion that is failing, either way the string is being modified in some way, and does not meet the input requirements.

Regards