Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6222539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:19:57+00:00 2026-05-24T08:19:57+00:00

I have created a small FTP program, it’s just for my own use, so

  • 0

I have created a small FTP program, it’s just for my own use, so login details + the file paths are hard coded.

I have a button which starts the downloading process of two txt files – the contents of these are put into two different textboxes.

The txt files are encoded with UTF-8, and look like this:

line1
line2
line3
etc.

I have placed these two files on two different servers (two files on each server). On server 1, both files are downloaded and shown in the textboxes correctly, like this:

line1
line2
line3
etc.

On server 2, both files are downloaded and shown in the textboxes like this:

line1line2line3etc.

I really don’t understand why – I have not edited the software (the downloading process) nor the files, I have only edited the hard coded file paths of course, because of the change of server.

This is how I download one of the files (the other file is the same way, just with different names):

FtpWebRequest request = (FtpWebRequest)WebRequest.Create(folder + artistsFileNameTxt);
request.Method = WebRequestMethods.Ftp.DownloadFile;
request.Credentials = new NetworkCredential(login, pass);
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
Stream responseStream = response.GetResponseStream();
StreamReader reader = new StreamReader(responseStream);

tbxArtists.Text = reader.ReadToEnd();

reader.Close();
response.Close();

Any help?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:19:58+00:00Added an answer on May 24, 2026 at 8:19 am

    try

    request.UseBinary = false;
    

    the default is true… do this ONLY when you are SURE that you are dealing with a text file.

    FTP protocol has this “built-in” to deal with system-differences regardings NewLine…

    BTW you must set this setting correctly when uploading via FTP too otherwise it can get messy…

    http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest.usebinary.aspx
    http://www.rhinosoft.com/newsletter/NewsL2008-03-18.asp

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a small program which logs text data to a file on
I have created small test web application which makes use of LINQ to SQL.
I have created a small program to see if I'm as proficient in Python
I have created a small program to write XML-Comment for Properties(which dont have customer
I have created a small flash CS4 project that has a few custom components
I have created a small application which opens,reads and creates Excel files. The app
I want to globalize my application. I have created a small form which asks
I have created a few small flash widgets that stream .mp3 audio from an
I have created small socket programs (client/server). Client will transfer all formats of files
I'Ve just created a small application with a toolbar, some toolbar buttons and an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.